login
a(n) = sum of the prime divisors of the n-th squarefree composite number.
1

%I #29 Aug 02 2024 21:08:58

%S 5,7,9,8,10,13,15,10,14,19,12,21,16,12,25,20,16,22,31,33,18,16,26,14,

%T 39,18,18,43,22,45,32,20,34,49,24,22,15,55,18,40,24,28,61,24,63,44,46,

%U 20,26,69,28,50,73,24,34,75,20,36,81,56,30,19,85,24,34,62,91,22,64,42,36

%N a(n) = sum of the prime divisors of the n-th squarefree composite number.

%C Similar to the definition of A120944 except we list the sum of the divisors of n instead of n.

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

%F a(n) = A008472(A120944(n)) = A001414(A120944(n)).

%e The 3rd squarefree composite number is 14 = 2*7, so a(3) = 2 + 7 = 9.

%p map(t-> convert(numtheory:-factorset(t),`+`), select(numtheory:-issqrfree and not isprime, [$6..1000]));# _Robert Israel_, Oct 09 2015

%t lim = 200; Total@ Map[First, FactorInteger@ #] & /@ Select[Range@ lim, SquareFreeQ@ # && CompositeQ@ # &] (* _Michael De Vlieger_, Oct 09 2015 *)

%o (PARI) distinct(n) = \\ Sum of the distinct divisors p1,p2.. of n

%o if p1*p2..=n { local(a,x,m,p,ln,s); for(m=2,n, p=1; s=0; a=ifactord(m); ln=length(a); if(ln > 1, for(x=1,ln, p*=a[x]; s+=a[x]; ) ); if(p==m, print1(s",") ) ) }

%o ifactord(n,m=0) = \\The vector of the distinct integer factors of n.

%o { local(f,j,k,flist); flist=[]; f=Vec(factor(n,m)); for(j=1,length(f[1]), flist = concat(flist,f[1][j]) ); return(flist) }

%o (Python)

%o from math import isqrt

%o from sympy import primepi, mobius

%o def A109352(n):

%o def f(x): return n+1+primepi(x)+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))

%o m, k = n+1, f(n+1)

%o while m != k:

%o m, k = k, f(k)

%o return sum(primefactors(m)) # _Chai Wah Wu_, Aug 02 2024

%Y Cf. A000469, A001414, A008472, A120944.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Aug 21 2005