# Computed 2018-03-13 in GP/PARI CALCULATOR Version 2.9.4 (released) amd64 running mingw (x86-64/GMP-6.1.2 kernel) 64-bit version, compiled: Dec 20 2017, gcc version 4.9.1 (GCC), threading engine: single # with the following PARI-program: # # up_to = 65537; # 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])); } # 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 # v101296 = rgs_transform(vector(up_to, n, A046523(n))); # A101296(n) = v101296[n]; # A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After _M. F. Hasler_'s code for A006530. # A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) -1)); # Aux300827(n) = { my(m=1); if(n<=2, n-1, fordiv(n,d,if((d>1)&(d