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.

Showing 1-1 of 1 results.

A246401 Smallest prime number Q such that the sum prime(n)+prime(n+1)+Q is a prime number.

Original entry on oeis.org

2, 3, 5, 5, 5, 7, 5, 5, 7, 7, 3, 5, 5, 7, 3, 19, 7, 3, 11, 5, 5, 5, 7, 5, 13, 7, 13, 7, 5, 11, 5, 3, 5, 5, 7, 3, 11, 7, 7, 7, 7, 7, 5, 7, 5, 11, 5, 7, 5, 5, 7, 7, 7, 13, 3, 31, 7, 23, 5, 5, 11, 7, 13, 7, 11, 5, 5, 7, 5, 7, 7, 7, 3, 5, 7, 37, 11, 11, 11, 11, 13
Offset: 1

Views

Author

Pierre CAMI, Aug 25 2014

Keywords

Examples

			2+3+2=7 is prime so a(1)=2.
3+5+3=11 is prime so a(2)=3.
5+7+3=15 is composite, and 5+7+5=17 is prime so a(3)=5.
		

Crossrefs

Cf. A246400.

Programs

  • Mathematica
    spn[n_]:=Module[{p=2},While[!PrimeQ[n+p],p=NextPrime[p]];p]; spn/@ (Total/@ Partition[Prime[Range[100]],2,1]) (* Harvey P. Dale, Mar 14 2022 *)
  • PARI
    a(n) = t=prime(n)+prime(n+1); k=1; while(!isprime(t+q=prime(k)), k++); q \\ Colin Barker, Aug 25 2014
Showing 1-1 of 1 results.