OFFSET
1,12
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
PROG
(PARI)
up_to = 10000;
ispow2(n) = (n && !bitand(n, n-1));
A302777(n) = ispow2(isprimepower(n));
A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1, oo, if(A302777(n), i++; v[i] = n); if(i == up_to, return(v))); };
v050376 = A050376list(up_to);
A050376(n) = v050376[n];
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); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 29 2018
STATUS
approved