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.

A302030 a(n) = 1+A006068(A052331(n)).

This page as a plain text file.
%I A302030 #11 Apr 15 2018 15:05:43
%S A302030 1,2,4,8,16,3,32,7,64,15,128,5,256,31,13,512,1024,63,2048,9,29,127,
%T A302030 4096,6,8192,255,61,25,16384,14,32768,511,125,1023,17,57,65536,2047,
%U A302030 253,10,131072,30,262144,121,49,4095,524288,509,1048576,8191,1021,249,2097152,62,113,26,2045,16383,4194304,12,8388608,32767,33,505,241,126
%N A302030 a(n) = 1+A006068(A052331(n)).
%C A302030 This is the inverse of A207901 if it is considered with a starting offset 1.
%H A302030 Antti Karttunen, <a href="/A302030/b302030.txt">Table of n, a(n) for n = 1..4096</a>
%H A302030 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A302030 a(n) = 1+A302029(n) = 1+A006068(A052331(n)).
%o A302030 (PARI)
%o A302030 up_to_e = 8192;
%o A302030 v050376 = vector(up_to_e);
%o A302030 ispow2(n) = (n && !bitand(n,n-1));
%o A302030 i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to_e,break));
%o A302030 A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
%o A302030 A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ After code in A006068
%o A302030 A302030(n) = (1+A006068(A052331(n)));
%Y A302030 One more than A302029.
%Y A302030 Cf. A006068, A052331, A050376, A207901.
%K A302030 nonn
%O A302030 1,2
%A A302030 _Antti Karttunen_, Apr 13 2018