login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A302301 Number of ways to write n as a sum of two distinct semiprimes. 1

%I #22 May 26 2021 06:15:27

%S 0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,1,2,1,1,0,1,2,2,1,1,1,2,2,3,2,0,

%T 1,3,3,2,1,3,3,2,2,4,3,2,1,4,5,3,2,1,2,3,2,5,3,2,2,5,6,6,1,3,5,3,3,4,

%U 4,3,2,6,7,5,3,3,3,4,3,5,5,3,2,7,7,2,4

%N Number of ways to write n as a sum of two distinct semiprimes.

%H Alois P. Heinz, <a href="/A302301/b302301.txt">Table of n, a(n) for n = 0..20000</a> (first 1000 terms from Harvey P. Dale)

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%F a(n) = Sum_{i=1..floor((n-1)/2)} [Omega(i) = 2] * [Omega(n-i) = 2], where Omega = A001222 and [] is the Iverson bracket.

%e a(19) = 2; 19 = 15+4 = 10+9.

%p h:= proc(n) option remember; `if`(n=0, 0,

%p `if`(numtheory[bigomega](n)=2, n, h(n-1)))

%p end:

%p b:= proc(n, i) option remember; series(`if`(n=0, 1, `if`(i<1, 0,

%p `if`(i>n, 0, x*b(n-i, h(min(n-i, i-1))))+b(n, h(i-1)))), x, 3)

%p end:

%p a:= n-> coeff(b(n, h(n)), x, 2):

%p seq(a(n), n=0..120); # _Alois P. Heinz_, May 26 2021

%t Table[Sum[KroneckerDelta[PrimeOmega[i], 2] KroneckerDelta[PrimeOmega[n - i], 2], {i, Floor[(n - 1)/2]}], {n, 100}]

%t Table[Count[IntegerPartitions[n,{2}],_?(PrimeOmega[#[[1]]]==PrimeOmega[#[[2]]]==2&&#[[1]]!=#[[2]]&)],{n,90}] (* _Harvey P. Dale_, Aug 03 2020 *)

%o (PARI) a(n) = sum(i=1, (n-1)\2, (bigomega(i)==2)*(bigomega(n-i)==2)); \\ _Michel Marcus_, Apr 08 2018

%Y Cf. A001222, A001358, A072931.

%K nonn,look,easy

%O 0,20

%A _Wesley Ivan Hurt_, Apr 04 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:08 EDT 2024. Contains 371906 sequences. (Running on oeis4.)