login
Sum of the squarefree numbers from the smallest prime factor of n to the largest prime factor of n.
1

%I #29 Aug 24 2020 15:07:29

%S 0,2,3,2,5,5,7,2,3,10,11,5,13,23,8,2,17,5,19,10,21,44,23,5,5,57,3,23,

%T 29,10,31,2,42,103,18,5,37,122,55,10,41,23,43,44,8,188,47,5,7,10,101,

%U 57,53,5,39,23,120,243,59,10,61,304,21,2,52,44,67,103,186,23,71,5,73

%N Sum of the squarefree numbers from the smallest prime factor of n to the largest prime factor of n.

%C a(p) = p for prime p. - _Robert Israel_, Jan 18 2020

%H Robert Israel, <a href="/A074251/b074251.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%p 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

%t a[1] = 0; a[n_] := With[{f = FactorInteger[n]}, Select[Range[f[[1, 1]], f[[-1, 1]]], SquareFreeQ] // Total];

%t Array[a, 100] (* _Jean-François Alcover_, Aug 24 2020 *)

%Y Cf. A005117.

%K nonn

%O 1,2

%A _Jason Earls_, Sep 20 2002