login
A324197
Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324195(n) for all other numbers except f(2) = -1 and f(n) = -2 when n is an odd prime.
5
1, 2, 3, 4, 3, 4, 3, 5, 6, 7, 3, 5, 3, 8, 6, 9, 3, 5, 3, 9, 10, 11, 3, 9, 12, 13, 14, 15, 3, 5, 3, 16, 17, 18, 12, 9, 3, 19, 20, 16, 3, 21, 3, 22, 14, 23, 3, 16, 24, 25, 26, 27, 3, 9, 28, 29, 30, 31, 3, 9, 3, 32, 33, 29, 34, 35, 3, 36, 37, 25, 3, 16, 3, 38, 14, 39, 24, 40, 3, 29, 33, 41, 3, 16, 42, 43, 44, 45, 3, 9, 46, 47, 48, 49, 50, 29, 3, 51, 52, 16, 3, 53, 3, 54, 14
OFFSET
1,2
COMMENTS
For all i, j: a(i) = a(j) => A324190(i) = A324190(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; };
A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
A297112(n) = if(1==n, 0, 2^A297167(n));
A324195(n) = { my(v=0); fordiv(n, d, v = bitor(v, A297112(d))); (v); };
Aux324197(n) = if(isprime(n), -(n%2)-1, A324195(n));
v324197 = rgs_transform(vector(up_to, n, Aux324197(n)));
A324197(n) = v324197[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 20 2019
STATUS
approved