login
A351033
Lexicographically earliest infinite sequence such that a(i) = a(j) => A351031(i) = A351031(j), for all i, j >= 1.
4
1, 2, 2, 2, 2, 3, 2, 3, 3, 4, 2, 5, 2, 2, 6, 7, 2, 8, 2, 8, 3, 9, 2, 10, 4, 11, 8, 12, 2, 8, 2, 13, 4, 14, 4, 15, 2, 12, 12, 15, 2, 16, 2, 4, 17, 11, 2, 18, 2, 19, 20, 12, 2, 21, 22, 13, 7, 14, 2, 23, 2, 9, 24, 25, 20, 26, 2, 16, 12, 21, 2, 27, 2, 3, 28, 29, 9, 30, 2, 31, 32, 4, 2, 33, 19, 2, 20, 34, 2, 35, 11, 36
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A351031.
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; };
A019565(n) = { my(m=1, p=1); while(n>0, p = nextprime(1+p); if(n%2, m *= p); n >>= 1); (m); };
A048673(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1+factorback(f))/2; };
A289813(n) = { my(d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); } \\ From A289813
A351031(n) = { my(m=1); fordiv(n, d, if(d<n, m *= A019565(A304759(d)))); (m); };
v351033 = rgs_transform(vector(up_to, n, A351031(n)));
A351033(n) = v351033[n];
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Jan 29 2022
STATUS
approved