OFFSET
1,2
COMMENTS
a(p) = p for prime p. - Robert Israel, Jan 18 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(22) = 44 because 22 = 2*11 and the sum of squarefree numbers between 2 and 11 is 2 + 3 + 5 + 6 + 7 + 10 + 11 = 44.
MAPLE
with(numtheory): a:=proc(n) local nf, nnf, s, j: nf:=factorset(n): nnf:=nops(nf): s:=0: for j from nf[1] to nf[nnf] do if abs(mobius(j))>0 then s:=s+j else s:=s: fi: od: s: end: 0, seq(a(n), n=2..84); # Emeric Deutsch, Feb 24 2006
MATHEMATICA
a[1] = 0; a[n_] := With[{f = FactorInteger[n]}, Select[Range[f[[1, 1]], f[[-1, 1]]], SquareFreeQ] // Total];
Array[a, 100] (* Jean-François Alcover, Aug 24 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Sep 20 2002
STATUS
approved