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.

This page as a plain text file.
%I A286319 #30 May 04 2019 11:47:13
%S A286319 2,3,5,7,41,59,67,89,101,131,139,379,457,743,761,1193,1201,1381,1549,
%T A286319 1567,1747,1789,2137,2411,2557,2647,2663,2729,2731,3011,3221,3251,
%U A286319 3449,4057,4159,4447,4561,4751,5179,5641,6173,6397,6599,6833,7229,8669,9059,9157,9323
%N A286319 Prime p such that p^2-p-1 or p^2+p-1 is the smallest prime of a twin prime pair.
%C A286319 Union of A088483 and A120364.
%C A286319 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.
%C A286319 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.
%H A286319 Pierre CAMI, <a href="/A286319/b286319.txt">Table of n, a(n) for n = 1..50000</a>
%e A286319 2^2+2-1=5 and (5,7) is a twin prime pair so a(1)=2.
%e A286319 3^2-3-1=5, 3^2+3-1=11 and (5,7), (11,13) are twin prime pairs so a(2)=3.
%e A286319 5^2+5-1=29 and (29,31) is a twin prime pair so a(3)=5.
%e A286319 7^2-7-1=41 and (41,43) is a twin prime pair so a(4)=7.
%t A286319 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 *)
%Y A286319 Cf. A001359, A088483, A088485, A120364.
%K A286319 nonn
%O A286319 1,1
%A A286319 _Pierre CAMI_, May 11 2017