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.

A252754 Inverse of "Tree of Eratosthenes" permutation: a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A268674(2n+1)).

This page as a plain text file.
%I A252754 #29 May 28 2025 20:05:57
%S A252754 0,1,2,3,4,5,8,7,6,9,16,11,32,17,10,15,64,13,128,19,14,33,256,23,12,
%T A252754 65,18,35,512,21,1024,31,22,129,20,27,2048,257,34,39,4096,29,8192,67,
%U A252754 30,513,16384,47,24,25,26,131,32768,37,28,71,38,1025,65536,43,131072,2049,66,63,36,45,262144,259,46,41,524288,55,1048576,4097,130,515,40
%N A252754 Inverse of "Tree of Eratosthenes" permutation: a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A268674(2n+1)).
%H A252754 Antti Karttunen, <a href="/A252754/b252754.txt">Table of n, a(n) for n = 1..1024</a>
%H A252754 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A252754 a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A268674(2n+1)).
%F A252754 As a composition of related permutations:
%F A252754 a(n) = A054429(A252756(n)).
%F A252754 a(n) = A156552(A250246(n)).
%F A252754 From _Antti Karttunen_, Mar 31 2018: (Start)
%F A252754 A000120(a(n)) = A253557(n).
%F A252754 A069010(a(n)) = A302041(n).
%F A252754 A132971(a(n)) = A302050(n).
%F A252754 A106737(a(n)) = A302051(n).
%F A252754 (End)
%o A252754 (PARI) A252754(n) = if(1==n,0,if(!(n%2),1 + 2*A252754(n/2),2*A252754(A268674(n)))); \\ _Antti Karttunen_, Mar 31 2018
%o A252754 (Scheme)
%o A252754 ;; With memoization-macro definec.
%o A252754 (definec (A252754 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A252754 (/ n 2))))) (else (* 2 (A252754 (A250470 n))))))
%Y A252754 Inverse: A252753.
%Y A252754 Fixed points of a(n)+1: A253789.
%Y A252754 Cf. A250470, A253556, A253557, A253558, A253559, A268674, A302041.
%Y A252754 Similar permutations: A156552, A252756, A054429, A250246, A269388.
%Y A252754 Differs from A156552 for the first time at n=21, where a(21) = 14, while A156552(21) = 18.
%K A252754 nonn
%O A252754 1,3
%A A252754 _Antti Karttunen_, Jan 02 2015
%E A252754 Name edited and formula corrected by _Antti Karttunen_, Mar 31 2018