login
A322591
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 A007947(n) for any other number.
10
1, 2, 3, 2, 3, 4, 3, 2, 5, 6, 3, 4, 3, 7, 8, 2, 3, 4, 3, 6, 9, 10, 3, 4, 11, 12, 5, 7, 3, 13, 3, 2, 14, 15, 16, 4, 3, 17, 18, 6, 3, 19, 3, 10, 8, 20, 3, 4, 21, 6, 22, 12, 3, 4, 23, 7, 24, 25, 3, 13, 3, 26, 9, 2, 27, 28, 3, 15, 29, 30, 3, 4, 3, 31, 8, 17, 32, 33, 3, 6, 5, 34, 3, 19, 35, 36, 37, 10, 3, 13, 38, 20, 39, 40, 41, 4, 3, 7, 14, 6, 3, 42, 3, 12, 43
OFFSET
1,2
COMMENTS
For all i, j:
a(i) = a(j) => A066086(i) = A066086(j),
a(i) = a(j) => A322354(i) = A322354(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; };
A007947(n) = factorback(factorint(n)[, 1]);
Aux322591(n) = if((n>2)&&isprime(n), 0, A007947(n));
v322591 = rgs_transform(vector(up_to, n, Aux322591(n)));
A322591(n) = v322591[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 18 2018
STATUS
approved