login
A323079
Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -1 if n is an odd prime, and f(n) = A060681(n) for all other numbers.
4
1, 2, 3, 4, 3, 5, 3, 6, 7, 8, 3, 7, 3, 9, 10, 11, 3, 12, 3, 10, 13, 14, 3, 15, 16, 17, 18, 13, 3, 19, 3, 20, 21, 22, 23, 18, 3, 24, 25, 16, 3, 26, 3, 21, 27, 28, 3, 29, 30, 31, 32, 25, 3, 33, 34, 23, 35, 36, 3, 27, 3, 37, 30, 38, 39, 40, 3, 32, 41, 42, 3, 43, 3, 44, 45, 35, 46, 47, 3, 48, 49, 50, 3, 30, 51, 52, 53, 34, 3, 54, 55, 41, 56, 57, 58, 59, 3, 60, 46, 45, 3, 61, 3, 39
OFFSET
1,2
COMMENTS
For all i, j:
a(i) = a(j) => A323076(i) = A323076(j),
a(i) = a(j) => A323077(i) = A323077(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; };
A060681(n) = (n-if(1==n, n, n/vecmin(factor(n)[, 1])));
A323079aux(n) = if((n>2)&&isprime(n), -1, A060681(n));
v323079 = rgs_transform(vector(up_to, n, A323079aux(n)));
A323079(n) = v323079[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 04 2019
STATUS
approved