login
A330747
Number of values of k, 1 <= k <= n, with A049559(k) = A049559(n), where A049559(n) = gcd(n - 1, phi(n)).
4
1, 2, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 3, 9, 1, 10, 1, 11, 2, 12, 1, 13, 3, 14, 4, 1, 1, 15, 1, 16, 4, 17, 5, 18, 1, 19, 6, 20, 1, 21, 1, 22, 5, 23, 1, 24, 2, 25, 7, 2, 1, 26, 8, 27, 6, 28, 1, 29, 1, 30, 9, 31, 2, 1, 1, 32, 7, 3, 1, 33, 1, 34, 10, 4, 8, 35, 1, 36, 11, 37, 1, 38, 9, 39, 12, 40, 1, 41, 2, 42, 10, 43, 13
OFFSET
1,2
COMMENTS
Ordinal transform of A049559.
LINKS
MATHEMATICA
b[_] = 0;
a[n_] := With[{t = GCD[n-1, EulerPhi[n]]}, b[t] = b[t]+1];
Array[a, 105] (* Jean-François Alcover, Dec 27 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; };
A049559(n) = gcd(n-1, eulerphi(n));
v330747 = ordinal_transform(vector(up_to, n, A049559(n)));
A330747(n) = v330747[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 30 2019
STATUS
approved