login
A330756
Number of values of k, 1 <= k <= n, with A063994(k) = A063994(n), where A063994(n) = Product_{primes p dividing n} gcd(p-1, n-1).
2
1, 2, 1, 3, 1, 4, 1, 5, 2, 6, 1, 7, 1, 8, 2, 9, 1, 10, 1, 11, 3, 12, 1, 13, 4, 14, 3, 1, 1, 15, 1, 16, 5, 17, 6, 18, 1, 19, 7, 20, 1, 21, 1, 22, 1, 23, 1, 24, 2, 25, 8, 2, 1, 26, 9, 27, 10, 28, 1, 29, 1, 30, 11, 31, 2, 1, 1, 32, 12, 3, 1, 33, 1, 34, 13, 4, 14, 35, 1, 36, 4, 37, 1, 38, 3, 39, 15, 40, 1, 41, 2, 42, 16
OFFSET
1,2
COMMENTS
Ordinal transform of A063994.
LINKS
MATHEMATICA
A063994[n_] := If[n==1, 1, Times @@ GCD[n-1, First /@ FactorInteger[n]-1]];
Module[{b}, b[_] = 0;
a[n_] := With[{t = A063994[n]}, b[t] = b[t]+1]];
Array[a, 105] (* Jean-François Alcover, Jan 12 2022 *)
PROG
(PARI)
up_to = 65537;
A063994(n) = { my(f=factor(n)[, 1]); prod(i=1, #f, gcd(f[i]-1, n-1)); }; \\ From A063994
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; };
v330756 = ordinal_transform(vector(up_to, n, A063994(n)));
A330756(n) = v330756[n];
CROSSREFS
Cf. also A081373, A303756, A330747.
Sequence in context: A198336 A365431 A353960 * A330747 A337785 A290980
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 30 2019
STATUS
approved