OFFSET
1,4
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
Except for a(2) = 1, a(n) = A081373(n).
MATHEMATICA
With[{s = EulerPhi@ Range@ 105}, MapAt[# + 1 &, Table[Count[s[[2 ;; n]], _?(# == s[[n]] &)], {n, Length@ s}], 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];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 30 2018
STATUS
approved