OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
MATHEMATICA
f[n_] := Max@Table[{p, e} = pe; p^(2^(Length[IntegerDigits[e, 2]]-1)), {pe, FactorInteger[n]}];
b[_] = 1;
a[n_] := a[n] = With[{t = f[n]}, b[t]++];
Array[a, 105] (* Jean-François Alcover, Dec 18 2021 *)
PROG
(PARI)
up_to = 65537;
ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om, invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om, invec[i], (1+pt))); outvec; };
ispow2(n) = (n && !bitand(n, n-1));
A223491(n) = if(1==n, n, fordiv(n, d, if(ispow2(isprimepower(n/d)), return(n/d))));
v302789 = ordinal_transform(vector(up_to, n, A223491(n)));
A302789(n) = v302789[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 13 2018
STATUS
approved