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.

A179485 Sums of two successive primes s such that s+-3 are primes.

Original entry on oeis.org

8, 100, 1120, 1220, 1300, 2240, 2380, 2414, 3536, 3634, 4906, 4940, 5566, 5740, 6706, 7240, 8864, 9224, 9394, 10136, 10850, 12040, 12476, 12586, 12920, 13180, 13334, 13754, 14630, 14720, 15134, 16270, 17710, 18430, 18800, 19916, 21014, 21320
Offset: 1

Views

Author

Keywords

Comments

Intersection of A001043 and A087695. - Robert Israel, Oct 25 2017

Examples

			3+5=8,8-3=5(prime),8+3=11(prime),..
		

Crossrefs

Programs

  • Maple
    q:= 2; p:= 3;
    count:= 0:
    while count < 100 do
      q:= p; p:= nextprime(p);
      s:= q+p;
      if isprime(s-3) and isprime(s+3) then
        count:= count+1; A[count]:= s;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Oct 25 2017
  • Mathematica
    q=3;Select[Table[Prime[n]+Prime[n+1],{n,7!}],PrimeQ[ #-q]&&PrimeQ[ #+q]&]
    Select[Total/@Partition[Prime[Range[1400]],2,1],AllTrue[#+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 04 2018 *)