login
A305980
Filter sequence for a(Squarefree numbers > 1) = constant sequences.
5
1, 2, 2, 3, 2, 2, 2, 4, 5, 2, 2, 6, 2, 2, 2, 7, 2, 8, 2, 9, 2, 2, 2, 10, 11, 2, 12, 13, 2, 2, 2, 14, 2, 2, 2, 15, 2, 2, 2, 16, 2, 2, 2, 17, 18, 2, 2, 19, 20, 21, 2, 22, 2, 23, 2, 24, 2, 2, 2, 25, 2, 2, 26, 27, 2, 2, 2, 28, 2, 2, 2, 29, 2, 2, 30, 31, 2, 2, 2, 32, 33, 2, 2, 34, 2, 2, 2, 35, 2, 36, 2, 37, 2, 2, 2, 38, 2, 39, 40, 41, 2, 2, 2, 42, 2, 2, 2, 43, 2, 2, 2
OFFSET
1,2
COMMENTS
For all i, j: A305800(i) = A305800(j) => a(i) = a(j).
LINKS
FORMULA
a(1) = 1; for n > 1, if A008966(n) = 1 [when n is in A005117], then a(n) = 2, otherwise a(n) = 2+A057627(n).
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); }
v057627 = partialsums(x -> !issquarefree(x), up_to);
A057627(n) = v057627[n];
A305980(n) = if(1==n, n, if(issquarefree(n), 2, 2+A057627(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 02 2018
STATUS
approved