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

A318308
Restricted growth sequence transform of A294898.
1
1, 1, 1, 1, 2, 3, 4, 1, 4, 1, 5, 6, 7, 8, 2, 1, 9, 10, 11, 12, 5, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 1, 16, 22, 23, 24, 25, 26, 14, 27, 28, 29, 30, 8, 31, 16, 32, 33, 30, 34, 35, 4, 36, 20, 25, 37, 38, 39, 40, 41, 42, 43, 16, 1, 44, 15, 45, 31, 46, 47, 48, 49, 50, 51, 39, 7, 52, 20, 53, 54, 30, 55, 56, 57, 58, 59, 60, 47, 61, 62, 63, 22, 40, 46, 64
OFFSET
1,5
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; };
A294898(n) = (2*n - sigma(n) - hammingweight(n));
v318308 = rgs_transform(vector(up_to, n, A294898(n)));
A318308(n) = v318308[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 26 2018
STATUS
approved