login
A366297
Lexicographically earliest infinite sequence such that a(i) = a(j) => A359589(i) = A359589(j) for all i, j >= 1, where A359589 is Dirichlet inverse of function f(n) = (-1 + gcd(A003415(n), A276086(n))).
3
1, 2, 2, 2, 2, 3, 2, 4, 5, 2, 2, 2, 2, 4, 6, 2, 2, 2, 2, 4, 7, 2, 2, 2, 7, 8, 4, 2, 2, 2, 2, 2, 9, 2, 5, 10, 2, 11, 6, 2, 2, 2, 2, 4, 4, 12, 2, 13, 9, 8, 7, 14, 2, 15, 6, 2, 6, 2, 2, 2, 2, 4, 4, 16, 17, 2, 2, 4, 6, 2, 2, 18, 2, 4, 3, 3, 17, 2, 2, 2, 18, 2, 2, 19, 6, 8, 6, 20, 2, 21, 6, 4, 6, 22, 5, 2, 2, 14, 8, 20, 2, 14, 2, 2, 2
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A359589.
For all i, j: A305800(i) = A305800(j) => a(i) = a(j) => A359595(i) = A359595(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; };
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*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.
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
A327858(n) = gcd(A003415(n), A276086(n));
v366297 = rgs_transform(DirInverseCorrect(vector(up_to, n, A327858(n)-1)));
A366297(n) = v366297[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 07 2023
STATUS
approved