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.
%I A163485 #4 Mar 31 2012 13:21:18 %S A163485 0,3,1,2,14,15,13,12,6,7,5,4,8,11,9,10,58,57,59,56,62,63,61,60,54,55, %T A163485 53,52,50,49,51,48,26,25,27,24,30,31,29,28,22,23,21,20,18,17,19,16,32, %U A163485 35,33,34,46,47,45,44,38,39,37,36,40,43,41,42,234,233,235,232,228,229 %N A163485 Permutation of integers used for constructing A147995 and A163545. %H A163485 A. Karttunen, <a href="/A163485/b163485.txt">Table of n, a(n) for n = 0..65535</a> %H A163485 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %o A163485 (MIT Scheme:) %o A163485 (define (A163485 n) (let* ((i (floor->exact (/ (A000523 n) 2))) (dd (modulo (floor->exact (/ n (expt 4 i))) 4)) (r (if (zero? n) n (modulo n (expt 4 i))))) (cond ((zero? n) n) ((= 0 dd) (A163485 r)) ((= 1 dd) (+ (* 3 (expt 4 i)) (- (expt 4 i) 1 (A163485 (complement-i-oddpos-lsbs (A057300 r) i))))) ((= 2 dd) (+ (expt 4 i) (- (expt 4 i) 1 (A163485 (complement-i-oddpos-lsbs (A057300 r) i))))) (else (+ (* 2 (expt 4 i)) (A163485 r)))))) %o A163485 (define (complement-i-evenpos-lsbs n i) (if (zero? i) n (+ (- 1 (modulo n 2)) (* 2 (complement-i-oddpos-lsbs (floor->exact (/ n 2)) (-1+ i)))))) %o A163485 (define (complement-i-oddpos-lsbs n i) (+ (* 2 (complement-i-evenpos-lsbs (floor->exact (/ n 2)) i)) (modulo n 2))) %Y A163485 Inverse: A163486. This permutation can be used to construct array A147995 and its transpose A163545. See A163355 for a bit similarly defined recursive permutation. %K A163485 nonn %O A163485 0,2 %A A163485 _Antti Karttunen_, Aug 01 2009