login
A304528
Restricted growth sequence transform of A304526, which is Möbius transform of A064664, the inverse of EKG-sequence.
1
1, 1, 2, 1, 3, 4, 5, 6, 1, 4, 7, 8, 9, 4, 10, 3, 11, 12, 13, 14, 10, 4, 15, 2, 16, 4, 17, 18, 19, 20, 21, 16, 10, 4, 8, 20, 22, 4, 10, 23, 24, 25, 26, 27, 9, 4, 28, 29, 13, 25, 10, 7, 30, 29, 31, 32, 10, 4, 33, 32, 34, 4, 35, 36, 23, 37, 38, 11, 10, 36, 39, 31, 40, 4, 41, 42, 43, 41, 44, 25, 45, 4, 46, 9, 15, 4, 10, 36, 47, 48, 49, 41, 10, 4, 50, 11, 51
OFFSET
1,3
PROG
(PARI)
\\ Needs also code for A064664 and A304526:
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
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; };
write_to_bfile(1, rgs_transform(vector(32768, n, A304526(n))), "b304528.txt");
CROSSREFS
Sequence in context: A169808 A328395 A283069 * A360585 A175499 A340684
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 18 2018
STATUS
approved