OFFSET
1,1
COMMENTS
Square roots of A054735 where these are integer.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..4288 from Zak Seidov)
Zak Seidov, A152786 = 6*A037073: near-duplicates?, seqfan list, Aug 20 2010.
FORMULA
{n: n^2 = A054735(i), any i}. - R. J. Mathar, Dec 12 2008
EXAMPLE
6 is a term since (6^2)/2 = 18 = mean(17, 19).
12 is a term since (12^2)/2 = 72 = mean(71,73).
42 is a term since (42^2)/2 = 882 = mean(881,883).
MAPLE
isa := n -> isprime(n) and isprime(n+2) and issqr(2*n+2):
select(isa, [$4..1000000]): map(n -> sqrt(2*n+2), %); # Peter Luschny, Jan 05 2020
MATHEMATICA
lst={}; Do[p1=Prime[n]; p2=Prime[n+1]; If[p2-p1==2, e=(2*(p1+1))^(1/2); i=Floor[e]; If[e==i, AppendTo[lst, i]]], {n, 3*9!}]; lst
(* Second program: *)
Select[Map[Sqrt[2 #] &, Mean /@ Select[Partition[Prime@ Range[10^6], 2, 1], Subtract @@ # == -2 &]], IntegerQ] (* Michael De Vlieger, Feb 18 2018 *)
PROG
(PARI) forstep(n=6, 1e3, 6, if(isprime(n^2/2-1)&&isprime(n^2/2+1), print1(n", "))) \\ Charles R Greathouse IV, Feb 01 2013
(Magma) [k:k in [2..2800 by 2]| IsPrime(k*k div 2 -1) and IsPrime(k*k div 2 +1)]; // Marius A. Burtea, Jan 01 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 12 2008
EXTENSIONS
Edited by R. J. Mathar, Dec 12 2008
STATUS
approved