login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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