login
A373982
Lexicographically earliest infinite sequence such that a(i) = a(j) => A278226(A328768(i)) = A278226(A328768(j)), for all i, j >= 0.
7
1, 1, 2, 2, 3, 2, 4, 2, 3, 3, 5, 2, 6, 2, 7, 8, 4, 2, 9, 2, 7, 10, 11, 2, 10, 3, 5, 12, 13, 2, 11, 2, 10, 14, 15, 16, 8, 2, 10, 17, 18, 2, 19, 2, 20, 21, 22, 2, 23, 3, 24, 10, 25, 2, 20, 26, 17, 27, 28, 2, 29, 2, 7, 24, 16, 29, 30, 2, 20, 22, 31, 2, 32, 2, 33, 19, 34, 35, 36, 2, 11, 4, 37, 2, 22, 29, 11, 25, 38, 2, 33, 39, 17, 10, 40, 41, 10, 2, 42, 43, 20
OFFSET
0,3
COMMENTS
Restricted growth sequence transform of A278226(A328768(n)).
For all i, j >= 1:
A305800(i) = A305800(j) => A373983(i) = A373983(j) => a(i) = a(j).
For all i, j >= 0: a(i) = a(j) => A328771(i) = A328771(j).
PROG
(PARI)
up_to = 100000;
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; };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
A002110(n) = prod(i=1, n, prime(i));
A328768(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]*A002110(primepi(f[i, 1])-1)/f[i, 1]));
v373982 = rgs_transform(vector(1+up_to, n, A278226(A328768(n-1))));
A373982(n) = v373982[1+n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 25 2024
STATUS
approved