login
A323078
Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is an odd prime, and f(n) = A097246(n) for all other numbers.
4
1, 2, 3, 4, 3, 5, 3, 5, 6, 7, 3, 8, 3, 9, 10, 8, 3, 7, 3, 10, 11, 12, 3, 13, 14, 15, 10, 11, 3, 16, 3, 13, 17, 18, 19, 10, 3, 20, 21, 16, 3, 22, 3, 17, 23, 24, 3, 25, 26, 9, 27, 21, 3, 16, 28, 22, 29, 30, 3, 31, 3, 32, 19, 25, 33, 34, 3, 27, 35, 36, 3, 16, 3, 37, 11, 29, 38, 39, 3, 31, 23, 40, 3, 41, 42, 43, 44, 34, 3, 45, 46, 35, 47, 48, 49, 50, 3, 12, 28, 11, 3, 51, 3, 39, 52
OFFSET
1,2
COMMENTS
For all i, j: a(i) = a(j) => A322869(i) = A322869(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; };
A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i, 1]+1)^(f[i, 2]\2))*((f[i, 1])^(f[i, 2]%2))); };
A323078aux(n) = if((n>2)&&isprime(n), 0, A097246(n));
v323078 = rgs_transform(vector(up_to, n, A323078aux(n)));
A323078(n) = v323078[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 03 2019
STATUS
approved