login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A302030
a(n) = 1+A006068(A052331(n)).
2
1, 2, 4, 8, 16, 3, 32, 7, 64, 15, 128, 5, 256, 31, 13, 512, 1024, 63, 2048, 9, 29, 127, 4096, 6, 8192, 255, 61, 25, 16384, 14, 32768, 511, 125, 1023, 17, 57, 65536, 2047, 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
OFFSET
1,2
COMMENTS
This is the inverse of A207901 if it is considered with a starting offset 1.
FORMULA
a(n) = 1+A302029(n) = 1+A006068(A052331(n)).
PROG
(PARI)
up_to_e = 8192;
v050376 = vector(up_to_e);
ispow2(n) = (n && !bitand(n, n-1));
i = 0; for(n=1, oo, if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to_e, break));
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); };
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
A302030(n) = (1+A006068(A052331(n)));
CROSSREFS
One more than A302029.
Sequence in context: A341819 A352387 A110001 * A167426 A261702 A033491
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 13 2018
STATUS
approved