OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 18*A037073(n)^2. - M. F. Hasler, Jan 15 2009
EXAMPLE
18/2 = 9 = 3^2, 18*2 = 36 = 6^2.
MATHEMATICA
lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1], s=Sqrt[n*2]; If[Floor[s]==s, AppendTo[lst, n]]], {n, 6, 10!, 6}]; lst...and/or... lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1], s=Sqrt[n/2]; If[Floor[s]==s, AppendTo[lst, n]]], {n, 6, 10!, 6}]; lst
PROG
(PARI) for(i=1, 999, isprime(18*i^2+1) && isprime(18*i^2-1) && print1(18*i^2", ")) \\ M. F. Hasler, Jan 15 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jan 13 2009
STATUS
approved