cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072734 Simple triangle-stretching N X N -> N bijection, variant of A072732.

This page as a plain text file.
%I A072734 #5 May 01 2014 02:47:42
%S A072734 0,1,2,3,12,4,7,17,18,5,6,23,40,24,8,11,31,49,50,25,9,10,30,59,84,60,
%T A072734 32,13,16,39,71,97,98,61,33,14,15,38,70,111,144,112,72,41,19,22,48,83,
%U A072734 127,161,162,113,73,42,20,21,47,82,126,179,220,180,128,85,51,26,29,58
%N A072734 Simple triangle-stretching N X N -> N bijection, variant of A072732.
%H A072734 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A072734 (Scheme) (define (A072734 n) (packA072734 (A025581 n) (A002262 n)))
%o A072734 (define (packA001477 x y) (/ (+ (expt (+ x y) 2) x (* 3 y)) 2))
%o A072734 (define (packA072734 x y) (let ((x-y (- x y))) (cond ((negative? x-y) (packA001477 (+ (* 2 x) (modulo (1+ x-y) 2)) (+ (* 2 x) (floor->exact (/ (+ (- x-y) (modulo x-y 2)) 2))))) ((< x-y 3) (packA001477 (+ (* 2 y) x-y) (* 2 y))) (else (packA001477 (+ (* 2 y) (floor->exact (/ (1+ x-y) 2)) (modulo (1+ x-y) 2)) (+ (* 2 y) (modulo x-y 2)))))))
%Y A072734 Inverse: A072735, projections: A072740 & A072741, variant of the same theme: A072732. Used to construct the global arithmetic ranking scheme of plane binary trees presented in A072787/A072788. Cf. also A001477 and its projections A025581 & A002262.
%K A072734 nonn,tabl
%O A072734 0,3
%A A072734 _Antti Karttunen_, Jun 12 2002