login
A325384
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A000203(n), A009194(n)] for all other numbers, except f(p) = 0 for odd primes.
3
1, 2, 3, 4, 3, 5, 3, 6, 7, 8, 3, 9, 3, 10, 11, 12, 3, 13, 3, 14, 15, 16, 3, 17, 12, 14, 18, 19, 3, 20, 3, 21, 22, 23, 24, 25, 3, 26, 27, 28, 3, 29, 3, 30, 31, 32, 3, 33, 34, 35, 36, 37, 3, 38, 39, 40, 41, 42, 3, 43, 3, 44, 45, 46, 47, 48, 3, 49, 50, 51, 3, 52, 3, 53, 54, 55, 56, 57, 3, 58, 59, 49, 3, 60, 61, 62, 63, 64, 3, 65, 66, 67, 68, 51, 69, 70, 3, 71
OFFSET
1,2
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; };
A009194(n) = gcd(n, sigma(n));
Aux325384(n) = if((n%2)&&isprime(n), 0, [sigma(n), A009194(n)]);
v325384 = rgs_transform(vector(up_to, n, Aux325384(n)));
A325384(n) = v325384[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 08 2019
STATUS
approved