A145824 Lower twin primes p1 such that p1-1 is a square.
5, 17, 101, 197, 5477, 8837, 16901, 17957, 21317, 25601, 52901, 65537, 106277, 115601, 122501, 164837, 184901, 193601, 220901, 341057, 401957, 470597, 490001, 495617, 614657, 739601, 846401, 972197, 1110917, 1144901, 1336337, 1464101
Offset: 1
Keywords
Examples
p1 = 5 is a lower twin prime. 5-1 = 4 is a square.
Links
- Zak Seidov, Table of n, a(n) for n=1..4663, a(n)<10^12
Crossrefs
Cf. A080149. - Zak Seidov, Oct 21 2008
Subsequence of A002496 (Primes of form n^2 + 1). - Zak Seidov, Nov 25 2011
Programs
-
Magma
[p: p in PrimesUpTo(2000000) | IsSquare(p-1) and IsPrime(p+2)]; // Vincenzo Librandi, Nov 08 2014
-
Mathematica
lst={}; Do[p=Prime@n; If[PrimeQ@(p+2)&&Sqrt[p-1]==IntegerPart[Sqrt[p-1]],AppendTo[lst,p]],{n,9!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 11 2009 *)
-
PARI
g(n) = for(x=1,n,y=twinl(x)-1;if(issquare(y),print1(y+1","))) twinl(n) = local(c, x); c=0;x=1;while(c
Extensions
More terms from Zak Seidov, Oct 21 2008
Comments