OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..8192
PROG
(PARI)
up_to = 8192;
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])); }
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
write_to_bfile(1, rgs_transform(vector(up_to, n, A297171(n))), "b297161.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 27 2017
STATUS
approved