OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..32768
PROG
(PARI)
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(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
A002326(n) = if(n<0, 0, znorder(Mod(2, 2*n+1))); \\ This function from Michael Somos, Mar 31 2005
write_to_bfile(0, rgs_transform(vector(32769, n, A291755(n-1))), "b291766_upto32768.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 02 2017
STATUS
approved