OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65537
PROG
(PARI)
rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences, invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences, 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])); }
A005811(n) = hammingweight(bitxor(n, n>>1)); \\ This function from Gheorghe Coserea, Sep 03 2015
A286468(n) = { my(p=((n+1)%2), i=0, m=1); while(n>0, if(((n%2)==p), m *= prime(i), p = (n%2); i = i+1); n = n\2); m };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
write_to_bfile(0, rgs_transform(vector(65538, n, A278217(n-1))), "b286617.txt");
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, May 17 2017
STATUS
approved