login
A351094
Lexicographically earliest infinite sequence such that a(i) = a(j) => A351092(i) = A351092(j), for all i, j >= 1.
4
1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 2, 1, 1, 3, 4, 1, 4, 1, 5, 2, 6, 2, 7, 1, 8, 1, 1, 3, 2, 4, 1, 1, 4, 4, 9, 1, 1, 5, 1, 2, 2, 6, 3, 2, 8, 7, 7, 1, 6, 8, 10, 1, 8, 1, 11, 3, 12, 2, 13, 4, 14, 1, 15, 1, 11, 4, 16, 4, 17, 9, 18, 1, 12, 1, 19, 5, 20, 1, 15, 2, 1, 2, 2, 6, 21, 3, 4, 2, 4, 8, 3, 7, 1, 7, 22, 1, 3, 6, 8, 8
OFFSET
1,5
COMMENTS
Restricted growth sequence transform of A351092.
LINKS
PROG
(PARI)
up_to = 20000;
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); };
A289814(n) = { my(d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); }; \\ From A289814
A351092(n) = { my(m=1); fordiv(n>>valuation(n, 2), d, m *= A019565(A289814(d))); (m); };
v351094 = rgs_transform(vector(up_to, n, A351092(n)));
A351094(n) = v351094[n];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Jan 31 2022
STATUS
approved