login

Revision History for A072735

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Simple triangle-stretching N X N -> N bijection: Inverse of A072734, variant of A072733.
(history; published version)
#5 by Charles R Greathouse IV at Thu May 01 02:47:42 EDT 2014
AUTHOR

_Antti Karttunen _, Jun 12 2002

Discussion
Thu May 01
02:47
OEIS Server: https://oeis.org/edit/global/2208
#4 by Russ Cox at Sun Jul 10 18:39:40 EDT 2011
LINKS

<a href="/Sindx_index/Per.html#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

Discussion
Sun Jul 10
18:39
OEIS Server: https://oeis.org/edit/global/66
#3 by N. J. A. Sloane at Thu Nov 11 07:34:06 EST 2010
LINKS

<a href="/Sindx_Per.html#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

KEYWORD

nonn,tabl,new

#2 by N. J. A. Sloane at Fri Feb 27 03:00:00 EST 2009
LINKS

<a href="http://www.research.att.com/~njas/sequences/Sindx_Per.html#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

KEYWORD

nonn,tabl,new

#1 by N. J. A. Sloane at Fri May 16 03:00:00 EDT 2003
NAME

Simple triangle-stretching N X N -> N bijection: Inverse of A072734, variant of A072733.

DATA

0, 1, 2, 3, 5, 9, 10, 6, 14, 20, 21, 15, 4, 27, 35, 36, 28, 7, 8, 44, 54, 55, 45, 11, 13, 19, 65, 77, 78, 66, 22, 16, 26, 34, 90, 104, 105, 91, 37, 29, 12, 43, 53, 119, 135, 136, 120, 56, 46, 17, 18, 64, 76, 152, 170, 171, 153, 79, 67, 23, 25, 33, 89, 103, 189, 209, 210

OFFSET

0,3

LINKS

<a href="http://www.research.att.com/~njas/sequences/Sindx_Per.html#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

PROG

(Scheme) (define (A072735 n) (packA072735 (A025581 n) (A002262 n)))

(define (packA001477 x y) (/ (+ (expt (+ x y) 2) x (* 3 y)) 2))

(define (packA072735 x y) (cond ((<= x y) (let ((half-x (floor->exact (/ x 2)))) (packA001477 half-x (+ half-x (* 2 (- y (* 2 half-x))) (modulo x 2) (if (and (eq? x y) (even? x)) 0 -1))))) (else (let ((half-y (floor->exact (/ y 2)))) (packA001477 (+ half-y (* 2 (- (-1+ x) (* 2 half-y))) (modulo y 2) (if (and (eq? x (1+ y)) (even? y)) 1 0)) half-y)))))

CROSSREFS

Inverse: A072734, projections: A072781 & A072782, variant of the same theme: A072733. Cf. also A001477 and its projections A025581 & A002262.

KEYWORD

nonn,tabl

AUTHOR

Antti Karttunen Jun 12 2002

STATUS

approved