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”).

A304748
Restricted growth sequence transform of A291759(n), formed from 2-digits in ternary representation of A048673(n).
5
1, 2, 1, 2, 1, 3, 4, 2, 1, 2, 4, 5, 1, 3, 6, 2, 1, 2, 1, 2, 1, 5, 4, 7, 8, 9, 10, 5, 4, 9, 6, 2, 4, 2, 1, 2, 6, 3, 4, 2, 6, 2, 8, 7, 4, 3, 1, 11, 12, 13, 6, 13, 1, 14, 6, 7, 10, 5, 1, 13, 4, 7, 10, 2, 12, 3, 1, 2, 15, 3, 1, 2, 1, 16, 4, 5, 15, 5, 4, 2, 12, 7, 6, 2, 10, 16, 17, 11, 6, 5, 1, 5, 1, 18, 1, 19, 8, 20, 21, 22, 8, 16, 10, 22, 21
OFFSET
1,2
PROG
(PARI)
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
A048673(n) = (A003961(n)+1)/2;
A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From A289814
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; };
v304748 = rgs_transform(vector(65537, n, A291759(n)));
A304748(n) = v304748[n];
CROSSREFS
Cf. also A304746.
Sequence in context: A325702 A378635 A304746 * A323903 A329382 A322826
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2018
STATUS
approved