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 A332816 #14 Mar 04 2020 18:08:31 %S A332816 0,1,2,3,4,5,8,7,6,9,32,11,16,17,10,15,64,13,128,19,18,65,512,23,12, %T A332816 33,14,35,256,21,2048,31,66,129,20,27,1024,257,34,39,4096,37,8192,131, %U A332816 22,1025,32768,47,24,25,130,67,16384,29,68,71,258,513,131072,43,65536,4097,38,63,36,133,524288,259,1026,41,2097152,55,262144,2049,26,515 %N A332816 a(n) = A156552(A332808(n)). %H A332816 Antti Karttunen, <a href="/A332816/b332816.txt">Table of n, a(n) for n = 1..10000</a> %H A332816 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A332816 a(n) = A156552(A332808(n)). %F A332816 For n > 1, A070939(a(n)) = A332894(n). %F A332816 For n >= 1: (Start) %F A332816 A080791(a(n)) = A332899(n)-1. %F A332816 Among many identities given in A156552 that apply here as well we have for example the following ones: %F A332816 A000120(a(n)) = A001222(n). %F A332816 A069010(a(n)) = A001221(n). %F A332816 A106737(a(n)) = A000005(n). %F A332816 (End) %o A332816 (PARI) %o A332816 up_to = 26927; %o A332816 A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552 %o A332816 A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p,q,u); v[2] = 3; v[1] = 5; mapput(xs,1,1); mapput(xs,2,2); mapput(xs,3,3); for(n=4,up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs,primepi(q),n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); }; %o A332816 v332806 = A332806list(up_to); %o A332816 A332806(n) = v332806[n]; %o A332816 A332808(n) = { my(f=factor(n)); f[,1] = apply(A332806,apply(primepi,f[,1])); factorback(f); }; %o A332816 A332816(n) = A156552(A332808(n)); %Y A332816 Cf. A332815 (inverse permutation). %Y A332816 Cf. A070939, A156552, A332808, A332894, A332899. %K A332816 nonn %O A332816 1,3 %A A332816 _Antti Karttunen_, Feb 28 2020