OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..2657
EXAMPLE
111 = 3*37 and the sum of squarefree numbers between 3 and 37 is 3 + 5 + 6 + 7 + 10 + 11 + 13 + 14 + 15 + 17 + 19 + 21 + 22 + 23 + 26 + 29 + 30 + 31 + 33 + 34 + 35 + 37 = 441, a square.
MAPLE
N:= 10^4: # to get all terms <= N
sf:= select(numtheory:-issqrfree, [$1..N]):
ssf:= ListTools:-PartialSums(sf):
filter:= proc(n) local r, i, j;
r:= numtheory:-factorset(n);
j:= ListTools:-BinarySearch(sf, max(r));
i:= ListTools:-BinarySearch(sf, min(r));
issqr(ssf[j] - ssf[i-1])
end proc:
filter(1):= true:
select(filter, [$1..N]); # Robert Israel, Jan 31 2018
MATHEMATICA
Select[Range[5000], IntegerQ@ Sqrt@ Total@ Select[Range[First@ #, Last@ #], SquareFreeQ] &[FactorInteger[#][[All, 1]]] &] (* Michael De Vlieger, Jan 31 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Sep 20 2002
STATUS
approved