login
A332827
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A003557(A332824(n)) for all other numbers, except f(1) = 0.
3
1, 2, 3, 2, 3, 4, 3, 2, 5, 6, 3, 7, 3, 8, 3, 2, 3, 9, 3, 6, 10, 11, 3, 12, 13, 14, 15, 16, 3, 17, 3, 2, 5, 18, 13, 19, 3, 20, 21, 22, 3, 23, 3, 24, 25, 26, 3, 27, 5, 28, 3, 29, 3, 30, 21, 31, 5, 32, 3, 33, 3, 34, 35, 2, 13, 36, 3, 18, 10, 37, 3, 38, 3, 39, 40, 41, 25, 42, 3, 43, 44, 45, 3, 46, 3, 47, 48, 49, 3, 50, 40, 51, 52, 53, 3, 54, 3, 55, 56, 57, 3, 58, 3, 59, 60
OFFSET
1,2
COMMENTS
For all i, j:
A305801(i) = A305801(j) => a(i) = a(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; };
A019565(n) = {my(j, v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
A332824(n) = { my(m=1); fordiv(n, d, m *= A019565(eulerphi(d))); (m); };
A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };
Aux332827(n) = if(1==n, 0, A003557(A332824(n)));
v332827 = rgs_transform(vector(up_to, n, Aux332827(n)));
A332827(n) = v332827[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 25 2020
STATUS
approved