OFFSET
0,2
COMMENTS
If n is squarefree and not divisible by 5, a(n) = a(n-1)+4. - Robert Israel, Jun 29 2020
LINKS
Brandon Crofts, Table of n, a(n) for n = 0..20000 (first 10001 terms from Robert Israel)
Brandon Crofts, Mathematica code for 334524
MAPLE
df:= proc(n) local t, s, m0, m;
if n mod 5 = 0 then
m:= n/5;
t:= 4*nops(select(s -> s < n and s > m, numtheory:-divisors(5*m^2)))
else t:= 0
fi;
m0:= mul(`if`(s[1]=5, s[1]^ceil((s[2]-1)/2),
s[1]^ceil(s[2]/2)), s=ifactors(n)[2]);
t + 4 + 8*floor(n/m0/5);
end proc:
df(0):= 1:
ListTools:-PartialSums(map(df, [$0..100])); # Robert Israel, Jun 29 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Brandon Crofts, Jun 15 2020
STATUS
approved