login
A366796
Lexicographically earliest infinite sequence such that a(i) = a(j) => A366795(i) = A366795(j) for all i, j >= 0.
3
1, 2, 3, 1, 4, 5, 1, 2, 6, 7, 8, 3, 1, 2, 3, 1, 5, 8, 9, 4, 10, 11, 4, 5, 1, 2, 3, 1, 4, 5, 1, 2, 12, 13, 10, 6, 11, 14, 6, 7, 14, 15, 16, 8, 6, 7, 8, 3, 1, 2, 3, 1, 4, 5, 1, 2, 6, 7, 8, 6, 1, 2, 3, 1, 7, 17, 18, 5, 19, 15, 5, 8, 20, 21, 22, 9, 5, 8, 9, 4, 23, 22, 24, 10, 25, 25, 10, 11, 5, 8, 9, 4, 10, 11, 4, 5, 1
OFFSET
0,2
COMMENTS
Restricted growth sequence transform of A366795.
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; };
A001615(n) = if(1==n, n, my(f=factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1))); \\ After code in A001615
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
A344695(n) = gcd(sigma(n), A001615(n));
A366795(n) = A344695(A005940(1+n));
v366796 = rgs_transform(vector(1+up_to, n, A366795(n-1)));
A366796(n) = v366796[1+n];
CROSSREFS
Cf. also A366802, A366805.
Sequence in context: A193790 A055446 A104706 * A094137 A038802 A092942
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 26 2023
STATUS
approved