OFFSET
1,1
COMMENTS
Prime terms of this sequence are listed in A167276. - Altug Alkan, Mar 30 2016
EXAMPLE
7^2 + 11^2 - 1 = 169 (13^2, k is prime),
11^2 + 13^2 - 1 = 289 (17^2, k is prime),
23^2 + 29^2 - 1 = 1369 (37^2, k is prime),
109^2 + 113^2 - 1 = 24649 (157^2, k is prime),
211^2 + 223^2 - 1 = 94249 (307^2, k is prime),
307^2 + 311^2 - 1 = 190969 (437^2, k is semiprime),
1021^2 + 1031^2 - 1 = 2105401 (1451^2, k is prime),
42967^2 + 42979^2 - 1 = 3693357529 (60773^2, k is prime).
MATHEMATICA
p = 2; q = 3; lst = {}; While[p < 10^15, If[ IntegerQ@ Sqrt[p^2 + q^2 - 1], AppendTo[lst, Sqrt[p^2 + q^2 - 1]];
Print[Sqrt[p^2 + q^2 - 1]]]; p = q; q = NextPrime@ q] (* Robert G. Wilson v, Mar 30 2016 *)
PROG
(PARI) list(nn) = {p = 2; forprime(q=3, nn, if (issquare(s = q^2+p^2-1), print1(sqrtint(s), ", ")); p = q; ); } \\ Michel Marcus, Mar 29 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Emre APARI, Mar 29 2016
EXTENSIONS
More terms from Jinyuan Wang, Jan 09 2021
STATUS
approved