login
A331730
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A331595(n) for all other n, except for odd primes p, f(p) = 0.
2
1, 2, 3, 4, 3, 4, 3, 5, 4, 4, 3, 5, 3, 4, 6, 7, 3, 8, 3, 5, 6, 4, 3, 7, 4, 4, 5, 5, 3, 8, 3, 9, 6, 4, 6, 7, 3, 4, 6, 7, 3, 8, 3, 5, 10, 4, 3, 9, 4, 11, 6, 5, 3, 7, 12, 7, 6, 4, 3, 7, 3, 4, 10, 13, 12, 8, 3, 5, 6, 11, 3, 9, 3, 4, 8, 5, 6, 8, 3, 9, 7, 4, 3, 7, 12, 4, 6, 7, 3, 7, 12, 5, 6, 4, 12, 13, 3, 14, 10, 7, 3, 8, 3, 7, 15
OFFSET
1,2
COMMENTS
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A331597(i) = A331597(j) => A331596(i) = A331596(j),
a(i) = a(j) => A331731(i) = A331731(j) => A331600(i) = A331600(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; };
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A122111(n) = if(1==n, n, prime(bigomega(n))*A122111(A064989(n)));
A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m));
A331595(n) = gcd(A122111(n), A241909(n));
Aux331730(n) = if((n%2)&&isprime(n), 0, A331595(n));
v331730 = rgs_transform(vector(up_to, n, Aux331730(n)));
A331730(n) = v331730[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 25 2020
STATUS
approved