OFFSET
1,6
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..8192
FORMULA
PROG
(PARI)
up_to = 8192;
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); };
A000265(n) = (n/2^valuation(n, 2));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 13 2018
STATUS
approved