login
A323157
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A000265(A323155(n)) for all n, except with f(1) = 0.
3
1, 2, 2, 3, 2, 4, 2, 5, 2, 2, 2, 6, 2, 7, 2, 5, 2, 8, 2, 9, 2, 2, 2, 10, 2, 2, 2, 11, 2, 12, 2, 13, 2, 2, 2, 14, 2, 15, 2, 16, 2, 17, 2, 18, 2, 2, 2, 19, 2, 2, 2, 3, 2, 20, 2, 21, 2, 2, 2, 22, 2, 23, 2, 13, 2, 4, 2, 24, 2, 7, 2, 25, 2, 26, 2, 27, 2, 4, 2, 28, 2, 2, 2, 29, 2, 2, 2, 30, 2, 31, 2, 3, 2, 2, 2, 32, 2, 33, 2, 9, 2, 34, 2, 35, 2
OFFSET
1,2
COMMENTS
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
A323156(i) = A323156(j) => a(i) = a(j),
a(i) = a(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; };
A000265(n) = (n/2^valuation(n, 2));
A323155(n) = { my(m=1); fordiv(n, d, if(isprime(d-1), m *= (d-1)^(1+valuation(n, d-1)))); (m); };
A323157aux(n) = if(1==n, 0, A000265(A323155(n)));
v323157 = rgs_transform(vector(up_to, n, A323157aux(n)));
A323157(n) = v323157[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 09 2019
STATUS
approved