login
A323401
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A003557(n), A323363(n)] for all other numbers, except f(n) = 0 for odd primes.
4
1, 2, 3, 4, 3, 5, 3, 6, 7, 8, 3, 9, 3, 10, 10, 11, 3, 12, 3, 13, 14, 15, 3, 16, 17, 18, 19, 20, 3, 21, 3, 22, 23, 24, 23, 25, 3, 26, 27, 28, 3, 29, 3, 30, 31, 32, 3, 33, 34, 35, 32, 36, 3, 37, 32, 38, 39, 40, 3, 41, 3, 42, 43, 44, 45, 46, 3, 47, 42, 46, 3, 48, 3, 49, 50, 51, 42, 52, 3, 53, 54, 55, 3, 56, 57, 58, 59, 60, 3, 61, 62, 63, 64, 65, 59, 66, 3, 67, 68, 69, 3, 70, 3
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of function f, defined as f(n) = A323372(n) for all other numbers n, except f(p) = 0 for odd primes p.
For all i, j:
A323400(i) = A323400(j) => a(i) = a(j),
a(i) = a(j) => A322588(i) = A322588(j),
a(i) = a(j) => A323364(i) = A323364(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); };
Aux323401(n) = if((n>2)&&isprime(n), 0, [A003557(n), A323363(n)]);
v323401 = rgs_transform(vector(up_to, n, Aux323401(n)));
A323401(n) = v323401[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 15 2019
STATUS
approved