OFFSET
1,1
COMMENTS
Squares of the form prime(n)*prime(n+1) - 2*prime(n).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MAPLE
ZL:=[]:for p from 1 to 950 do if (isprime(p) and isprime(p+2)) then ZL:=[op(ZL), (p^2)]; fi; od; print(ZL); # Zerinvary Lajos, Mar 08 2007
MATHEMATICA
Select[First[#]Last[#]-2First[#]&/@Partition[Prime[Range[500]], 2, 1], IntegerQ[ Sqrt[#]]&] (* Harvey P. Dale, May 24 2011 *)
PROG
(PARI) p=2; forprime(q=3, , if(q-p==2, print1(p^2", ")); p=q) \\ Charles R Greathouse IV, Dec 16 2019
(Magma) [p^2 : p in PrimesUpTo(1100)| IsPrime(p+2)]; // Vincenzo Librandi, Dec 23 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Jul 05 2005
EXTENSIONS
Extended by Ray Chandler, Jul 10 2005
Name and comment swapped by Charles R Greathouse IV, Dec 16 2019
STATUS
approved