login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261889 Primes that are the square of the sum of a twin prime pair plus 1. 1

%I #23 Sep 08 2022 08:46:13

%S 577,1297,7057,14401,41617,90001,147457,156817,484417,746497,1299601,

%T 1742401,2702737,2944657,4260097,5308417,6051601,6780817,8785297,

%U 10497601,14107537,15210001,16451137,17438977,18147601,29419777,38937601,45968401,51322897,56791297

%N Primes that are the square of the sum of a twin prime pair plus 1.

%C Alternatively: Primes of the form (p + q)^2 + 1 where p and q are twin primes.

%C All the terms are congruent to 1 (mod 3).

%H K. D. Bajpai, <a href="/A261889/b261889.txt">Table of n, a(n) for n = 1..10000</a>

%e 577 appears in the sequence because it is a prime resulting from twin prime pair (11,13): (11 + 13)^2 + 1 = 577.

%e 7057 appears in the sequence because it is a prime resulting from twin prime pair (41,43): (41 + 43)^2 + 1 = 7057.

%p A261889:= proc() local a, b, d; a:= ithprime(n); b:=a+2; d:=(a+b)^2+1; if isprime(b)and isprime(d) then return (d): fi; end: seq(A261889 (), n=1..10000);

%t A261889 = {}; Do[p1 = Prime[n]; p2 = p1 + 2; p = (p1 + p2)^2 + 1; If[PrimeQ[p2] && PrimeQ[p], AppendTo[A261889, p]], {n, 1, 10000}]; A261889

%o (PARI) forprime(p = 1,10000, if(isprime(p+2) && isprime((p + p + 2)^2 + 1), print1(( (p + p + 2)^2 + 1), ", ")));

%o (PARI) list(lim)=my(v=List(),t,p=2); forprime(q=3,sqrtint(lim\1-1)\2+1, if(q-p==2 && isprime(t=(p+q)^2+1), listput(v,t)); p=q); Vec(v) \\ _Charles R Greathouse IV_, Sep 06 2015

%o (Magma) [k : p in PrimesUpTo (10000) | IsPrime(p+2) and IsPrime(k) where k is ((p + p + 2)^2 + 1)];

%Y Cf. A000040, A051779, A054735.

%K nonn

%O 1,1

%A _K. D. Bajpai_, Sep 05 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 08:13 EDT 2024. Contains 371265 sequences. (Running on oeis4.)