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 A246366 #8 Aug 27 2014 14:53:51 %S A246366 1,2,4,3,6,9,7,5,8,33,12,65,18,257,16,17,10,129,11,4097,34,2049,19, %T A246366 65537,15,8193,24,4194305,21,32769,66,1025,20,513,14,262145,22,16385, %U A246366 13,1099511627777,1026,2097153,130,68719476737,30,1048577,35,288230376151711745,8194,67108865,40,4398046511105,2050,8388609,28 %N A246366 Permutation of natural numbers: a(n) = A005941(A227413(n)). %C A246366 Maps even numbers to terms of A000051 (2^n + 1) in some order. %H A246366 Antti Karttunen, <a href="/A246366/b246366.txt">Table of n, a(n) for n = 1..95</a> %H A246366 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A246366 a(n) = A005941(A227413(n)) = 1 + A156552(A227413(n)). %o A246366 (PARI) %o A246366 default(primelimit,(2^31)+(2^30)); %o A246366 A002808(n) = { my(k=-1); while( -n + n += -k + k=primepi(n), ); n }; \\ This function from _M. F. Hasler_ %o A246366 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A246366 A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n)))); %o A246366 A005941(n) = A156552(n)+1; %o A246366 A227413(n) = if(1==n, 1, if(!(n%2), prime(A227413(n/2)), A002808(A227413((n-1)/2)))); %o A246366 A246366(n) = A005941(A227413(n)); %o A246366 for(n=1, 95, write("b246366.txt", n, " ", A246366(n))); %o A246366 (Scheme) (define (A246368 n) (A227413 (A005941 n))) %Y A246366 Inverse: A246365. %Y A246366 Related or similar permutations: A005941, A156552, A227413, A246364, A246368. %Y A246366 Cf. A000051. %K A246366 nonn %O A246366 1,2 %A A246366 _Antti Karttunen_, Aug 26 2014