OFFSET
1,2
COMMENTS
LINKS
PROG
(PARI)
allocatemem(2^30);
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])); }
A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
A297168v1(n) = if(1==n, -1, sumdiv(n, d, (d<n)*A297112(d)));
write_to_bfile(1, rgs_transform(vector(up_to, n, A297168v1(n))), "b297169.txt");
\\ (More efficient PARI program) - Antti Karttunen, Mar 13 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 27 2018
STATUS
approved