login
A322589
Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 for odd primes, and f(n) = A007913(n) for any other number.
6
1, 2, 3, 1, 3, 4, 3, 2, 1, 5, 3, 6, 3, 7, 8, 1, 3, 2, 3, 9, 10, 11, 3, 4, 1, 12, 6, 13, 3, 14, 3, 2, 15, 16, 17, 1, 3, 18, 19, 5, 3, 20, 3, 21, 9, 22, 3, 6, 1, 2, 23, 24, 3, 4, 25, 7, 26, 27, 3, 8, 3, 28, 13, 1, 29, 30, 3, 31, 32, 33, 3, 2, 3, 34, 6, 35, 36, 37, 3, 9, 1, 38, 3, 10, 39, 40, 41, 11, 3, 5, 42, 43, 44, 45, 46, 4, 3, 2, 21, 1, 3, 47, 3, 12, 48
OFFSET
1,2
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; };
Aux322589(n) = if((n>2)&&isprime(n), 0, core(n));
v322589 = rgs_transform(vector(up_to, n, Aux322589(n)));
A322589(n) = v322589[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 18 2018
STATUS
approved