A288949 Numbers that are both the sum of two consecutive primes and the sum of two consecutive semiprimes.
24, 36, 100, 112, 120, 240, 288, 320, 372, 472, 532, 576, 600, 810, 828, 864, 882, 924, 990, 1088, 1104, 1164, 1180, 1208, 1236, 1284, 1360, 1392, 1482, 1508, 1560, 1584, 1620, 1632, 1692, 1740, 1818, 1900, 1920, 1938
Offset: 1
Keywords
Examples
24 is a term because 24 = 11+13 and 24 = 10+14. Alternatively, 24 = A001043(5) = A118717(4), 36 = A001043(7) = A118717(6).
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
sp=Select[Range[4,1000],2==PrimeOmega[#]&]; Select[Table[sp[[k]]+sp[[k+1]],{k,100}], #==(p=NextPrime[#/2,-1])+NextPrime[p]&] Module[{nn=2000,sp},sp=Total/@Partition[Select[Range[nn],PrimeOmega[#]==2&],2,1];Intersection[ sp,Total/@Partition[Prime[Range[nn]],2,1]]] (* Harvey P. Dale, Jul 31 2023 *)
-
PARI
issemi(n)=bigomega(n)==2 nextsp(x)=x=ceil(x); while(!issemi(x), x++); x has(n)=precprime((n-1)/2)+nextprime(n/2)==n list(lim)=my(v=List(),last=4,t); forfactored(n=6,nextsp(lim\2), if(vecsum(n[2][,2])==2, if(has(t=last+n[1]) && t<=lim, listput(v,t)); last=n[1])); Vec(v) \\ Charles R Greathouse IV, Feb 19 2018
Comments