login
A303753
Ordinal transform of cototient (A051953).
3
1, 1, 2, 1, 3, 1, 4, 2, 1, 1, 5, 1, 6, 2, 1, 3, 7, 1, 8, 2, 1, 3, 9, 1, 1, 1, 2, 2, 10, 1, 11, 3, 1, 1, 1, 1, 12, 1, 1, 2, 13, 1, 14, 3, 1, 4, 15, 1, 2, 2, 1, 1, 16, 1, 2, 2, 2, 3, 17, 1, 18, 3, 1, 4, 1, 1, 19, 2, 1, 2, 20, 1, 21, 1, 1, 1, 2, 1, 22, 2, 2, 1, 23, 1, 3, 2, 1, 3, 24, 1, 2, 4, 1, 5, 1, 1, 25, 1, 1, 2, 26, 1, 27, 2, 1
OFFSET
1,3
COMMENTS
Number of values of k, 1 <= k <= n, with A051953(k) = A051953(n).
LINKS
FORMULA
For all n >= 1, a(A000040(n)) = n.
MAPLE
b:= proc() 0 end:
a:= proc(n) option remember; local t;
t:= numtheory[phi](n)-n; b(t):= b(t)+1
end:
seq(a(n), n=1..120); # Alois P. Heinz, Apr 30 2018
MATHEMATICA
b[_] = 0;
a[n_] := a[n] = With[{t = EulerPhi[n]-n}, b[t] = b[t]+1];
Array[a, 120] (* Jean-François Alcover, Dec 19 2021, after Alois P. Heinz *)
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; };
A051953(n) = (n - eulerphi(n));
v303753 = ordinal_transform(vector(up_to, n, A051953(n)));
A303753(n) = v303753[n];
CROSSREFS
Cf. A051953, A065385 (gives a subset of the positions of ones).
Cf. also A081373, A303754.
Sequence in context: A361441 A340088 A087114 * A088242 A228814 A299483
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 30 2018
STATUS
approved