OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
FORMULA
a(prime) = 2, a(prime^2) = 3, a(prime^3) = 5, a(prime^4) = 10, a(prime^5) = 19.
PROG
(PARI)
up_to = 100000;
partialsums(f, up_to) = { my(v = vector(up_to), s=0); for(i=1, up_to, s += f(i); v[i] = s); (v); }
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; };
v065515 = partialsums(n -> (omega(n)<=1), up_to);
A065515(n) = v065515[n];
v305975 = rgs_transform(vector(up_to, n, A305974(n)));
A305975(n) = v305975[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 02 2018
STATUS
approved