A322874 Ordinal transform of A007431, which is Möbius transform of Euler phi.
1, 1, 2, 3, 1, 2, 1, 1, 1, 3, 1, 4, 1, 4, 2, 2, 1, 5, 1, 3, 2, 6, 1, 2, 1, 7, 1, 3, 1, 8, 1, 1, 2, 9, 2, 3, 1, 10, 2, 1, 1, 11, 1, 3, 2, 12, 1, 4, 1, 13, 3, 3, 1, 14, 2, 1, 2, 15, 1, 4, 1, 16, 1, 2, 1, 17, 1, 4, 2, 18, 1, 2, 1, 19, 3, 3, 2, 20, 1, 3, 2, 21, 1, 4, 3, 22, 3, 1, 1, 23, 1, 3, 2, 24, 2, 3, 1, 25, 3, 4, 1, 26, 1, 1, 5
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Mathematica
A007431[n_] := Sum[EulerPhi[d] MoebiusMu[n/d], {d, Divisors[n]}]; b[_] = 0; a[n_] := a[n] = With[{t = A007431[n]}, b[t] = b[t]+1]; Array[a, 105] (* Jean-François Alcover, Dec 20 2021 *)
-
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; }; A007431(n) = sumdiv(n,d,moebius(n/d)*eulerphi(d)); v322874 = ordinal_transform(vector(up_to,n,A007431(n))); A322874(n) = v322874[n];