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”).

A302784
Inverse permutation to A302783: a(n) = A003188(A052331(n)).
3
0, 1, 3, 6, 12, 2, 24, 7, 48, 13, 96, 5, 192, 25, 15, 384, 768, 49, 1536, 10, 27, 97, 3072, 4, 6144, 193, 51, 30, 12288, 14, 24576, 385, 99, 769, 20, 54, 49152, 1537, 195, 11, 98304, 26, 196608, 102, 60, 3073, 393216, 387, 786432, 6145, 771, 198, 1572864, 50, 108, 31, 1539, 12289, 3145728, 9, 6291456, 24577, 40, 390, 204, 98, 12582912, 774, 3075, 21
OFFSET
1,3
FORMULA
a(n) = A003188(A052331(n)).
PROG
(PARI)
up_to = 4096;
v050376 = vector(up_to);
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, 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); };
A003188(n) = bitxor(n, n>>1);
CROSSREFS
Cf. A302783 (inverse).
Cf. also A302029.
Sequence in context: A102253 A359799 A246210 * A329889 A296347 A081513
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 16 2018
STATUS
approved