login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of ways of writing n as a sum of a prime and a squarefree semiprime.
4

%I #17 Jun 15 2020 16:26:19

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

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

%U 7,7,5,4,4,4,7,7,8,6,3,6,7,8,8,3,4,7,6,8,10,8,3,4,8,11,10,6,8,7,11,9,9,5,6,5,9,11,9,5,8

%N Number of ways of writing n as a sum of a prime and a squarefree semiprime.

%C Conjecture: a(n) > 0 for all n > 30.

%H Robert Israel, <a href="/A282192/b282192.txt">Table of n, a(n) for n = 0..10000</a>

%H Ilya Gutkovskiy, <a href="/A282192/a282192.pdf">Extended graphical example</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Semiprime.html">Semiprime</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Squarefree.html">Squarefree</a>

%e a(17) = 4 because we have [15, 2], [14, 3], [11, 6] and [10, 7].

%p N:= 200: # for a(0)..a(N)

%p P:= select(isprime, [2,seq(i,i=3..N,2)]): nP:= nops(P):

%p SFS:= NULL: j:= nP:

%p for i from 1 to nP while j > 0 do

%p while P[i]*P[j] > N do j:= j-1; if j = 0 then break fi; od:

%p SFS:= SFS, op(map(`*`,P[1..min(i-1,j)],P[i]))

%p od:

%p gS:= add(x^i,i=[SFS]):

%p gP:= add(x^P[i],i=1..nP):

%p g:= gP*gS:

%p [seq(coeff(g,x,i),i=0..N)]; # _Robert Israel_, Jun 15 2020

%t nmax = 108; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}] Sum[MoebiusMu[k]^2 Floor[2/PrimeOmega[k]] Floor[PrimeOmega[k]/2] x^k, {k, 2, nmax}], {x, 0, nmax}], x]

%Y Cf. A000040, A006881, A098983, A100949, A258139, A282318, A282355.

%K nonn,look

%O 0,14

%A _Ilya Gutkovskiy_, Feb 15 2017