login
A323400
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A000035(n), A003557(n), A323363(n)] for all other numbers, except f(n) = 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, 18, 19, 20, 21, 3, 22, 3, 23, 24, 25, 24, 26, 3, 27, 28, 29, 3, 30, 3, 31, 32, 33, 3, 34, 35, 36, 37, 38, 3, 39, 37, 40, 41, 42, 3, 43, 3, 44, 45, 46, 47, 48, 3, 49, 50, 48, 3, 51, 3, 52, 53, 54, 50, 55, 3, 56, 57, 58, 3, 59, 60, 61, 62, 63, 3, 64, 65, 66, 67, 68, 62, 69, 3, 70, 71, 72, 3, 73, 3
OFFSET
1,2
COMMENTS
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A323369(i) = A323369(j),
a(i) = a(j) => A323401(i) = A323401(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; };
DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = -sumdiv(n, d, if(d<n, v[n/d]*u[d], 0))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A001615(n) = (n * sumdivmult(n, d, issquarefree(d)/d)); \\ From A001615
v323363 = DirInverse(vector(up_to, n, A001615(n)));
A323363(n) = v323363[n];
A003557(n) = { my(f=factor(n)); for(i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };
Aux323400(n) = if((n>2)&&isprime(n), 0, [(n%2), A003557(n), A323363(n)]);
v323400 = rgs_transform(vector(up_to, n, Aux323400(n)));
A323400(n) = v323400[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 15 2019
STATUS
approved