cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A288949 Numbers that are both the sum of two consecutive primes and the sum of two consecutive semiprimes.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Jun 20 2017

Keywords

Comments

Positions of a(n) in A001043 and A118717: {5, 4}, {7, 6}, {15, 17}, {16, 19}, {17, 21}, {30, 39}, {34, 48}, {37, 53}, {42, 60}, {51, 77}.

Examples

			24 is a term because 24 = 11+13 and 24 = 10+14.
Alternatively, 24 = A001043(5) = A118717(4), 36 = A001043(7) = A118717(6).
		

Crossrefs

Intersection of A001043 and A118717.

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