login
A322814
Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(2) = -1, f(n) = 0 if n is an odd prime, and f(n) = A278221(n) for all other numbers.
3
1, 2, 3, 4, 3, 5, 3, 4, 6, 7, 3, 5, 3, 8, 7, 4, 3, 5, 3, 7, 9, 10, 3, 5, 11, 12, 6, 8, 3, 13, 3, 4, 14, 15, 8, 5, 3, 16, 17, 7, 3, 18, 3, 10, 7, 19, 3, 5, 20, 7, 21, 12, 3, 5, 14, 8, 22, 23, 3, 13, 3, 24, 9, 4, 25, 26, 3, 15, 27, 18, 3, 5, 3, 28, 7, 16, 10, 29, 3, 7, 6, 30, 3, 18, 31, 32, 33, 10, 3, 13, 17, 19, 34, 35, 36, 5, 3, 8, 14, 7, 3, 37, 3, 12, 18
OFFSET
1,2
COMMENTS
For all i, j: a(i) = a(j) => A001221(i) = A001221(j).
LINKS
PROG
(PARI)
up_to = 4096;
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; };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A122111(n) = if(1==n, n, prime(bigomega(n))*A122111(A064989(n)));
A322814aux(n) = if(2==n, -1, if(isprime(n), 0, A046523(A122111(n))));
v322814 = rgs_transform(vector(up_to, n, A322814aux(n)));
A322814(n) = v322814[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 27 2018
STATUS
approved