OFFSET
1,1
COMMENTS
3 is the only lower twin prime for which p1+1 is a square. This follows from the fact that lower twin primes > 3 are of the form 3n+2 and adding 1 we get a number of the form 3m. Then 3m = k^2 implies k = 3r and 3m = 9r^2. Subtracting 1 we have 3m = (3r-1)(3r+1) not prime contradicting 3m-1 is prime.
Conjecture: There exist an infinite number of primes of this form.
a(n) = A080149(n)^2 + 1. - Zak Seidov, Oct 21 2008
LINKS
Zak Seidov, Table of n, a(n) for n=1..4663, a(n)<10^12
EXAMPLE
p1 = 5 is a lower twin prime. 5-1 = 4 is a square.
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 *)
PROG
(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<n, if(ispseudoprime(prime(x)+2), c++);
x++; ); return(prime(x-1))
(Magma) [p: p in PrimesUpTo(2000000) | IsSquare(p-1) and IsPrime(p+2)]; // Vincenzo Librandi, Nov 08 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 20 2008
EXTENSIONS
More terms from Zak Seidov, Oct 21 2008
STATUS
approved