OFFSET
1,8
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
MATHEMATICA
Block[{s = Table[Which[n == 1, 1, EvenQ@n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n], {n, 120}], t}, t = EulerPhi@ Range@ Max@ s; Map[Function[n, Count[t[[2 ;; n]], _?(# == t[[n]] &)]], s] /. 0 -> 1] (* Michael De Vlieger, Nov 23 2018 *)
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; };
Aux303757(n) = if(1==n, 0, eulerphi(n));
v303757 = ordinal_transform(vector(up_to, n, Aux303757(n)));
A303757(n) = v303757[n];
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 22 2018
STATUS
approved