login
A323156
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323155(n) for all n, except f(1) = 0.
4
1, 2, 3, 4, 2, 5, 2, 6, 3, 2, 2, 7, 2, 8, 3, 6, 2, 9, 2, 10, 3, 2, 2, 11, 2, 2, 3, 12, 2, 13, 2, 14, 3, 2, 2, 15, 2, 16, 3, 17, 2, 18, 2, 19, 3, 2, 2, 20, 2, 2, 3, 4, 2, 21, 2, 22, 3, 2, 2, 23, 2, 24, 3, 14, 2, 5, 2, 25, 3, 8, 2, 26, 2, 27, 3, 28, 2, 5, 2, 29, 3, 2, 2, 30, 2, 2, 3, 31, 2, 32, 2, 4, 3, 2, 2, 33, 2, 34, 3, 10, 2, 35, 2, 36, 3
OFFSET
1,2
COMMENTS
For all i, j:
a(i) = a(j) => A072627(i) = A072627(j),
a(i) = a(j) => A323157(i) = A323157(j) => A322977(i) = A322977(j).
LINKS
PROG
(PARI)
up_to = 65537;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A323155(n) = { my(m=1); fordiv(n, d, if(isprime(d-1), m *= (d-1)^(1+valuation(n, d-1)))); (m); };
v323156 = rgs_transform(vector(up_to, n, if(1==n, 0, A323155(n))));
A323156(n) = v323156[n];
CROSSREFS
Cf. A323157, also A322315.
Sequence in context: A173229 A366296 A191248 * A075994 A305893 A374477
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 09 2019
STATUS
approved