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.

A286319 Prime p such that p^2-p-1 or p^2+p-1 is the smallest prime of a twin prime pair.

Original entry on oeis.org

2, 3, 5, 7, 41, 59, 67, 89, 101, 131, 139, 379, 457, 743, 761, 1193, 1201, 1381, 1549, 1567, 1747, 1789, 2137, 2411, 2557, 2647, 2663, 2729, 2731, 3011, 3221, 3251, 3449, 4057, 4159, 4447, 4561, 4751, 5179, 5641, 6173, 6397, 6599, 6833, 7229, 8669, 9059, 9157, 9323
Offset: 1

Views

Author

Pierre CAMI, May 11 2017

Keywords

Comments

Union of A088483 and A120364.
3 is the only prime such that p^2-p-1 and p^2+p-1 are both the smallest of a prime twin pair.
For prime p > 3 if p+1 is divisible by 6 then the smallest prime of the prime twin pair is p^2+p-1 and p^2-p-1 if not.

Examples

			2^2+2-1=5 and (5,7) is a twin prime pair so a(1)=2.
3^2-3-1=5, 3^2+3-1=11 and (5,7), (11,13) are twin prime pairs so a(2)=3.
5^2+5-1=29 and (29,31) is a twin prime pair so a(3)=5.
7^2-7-1=41 and (41,43) is a twin prime pair so a(4)=7.
		

Crossrefs

Programs

  • Mathematica
    sptppQ[n_]:=AllTrue[{n^2-n-1,n^2-n+1},PrimeQ]||AllTrue[{n^2+n-1,n^2+ n+ 1},PrimeQ]; Select[Prime[Range[1200]],sptppQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 04 2019 *)