login
A342553
Least integer m > 2*n such that m-2*n and m+2*n are both squares, for n>1.
0
5, 10, 17, 26, 13, 50, 20, 82, 29, 122, 25, 170, 53, 34, 68, 290, 45, 362, 41, 58, 125, 530, 52, 626, 173, 90, 65, 842, 61, 962, 80, 130, 293, 74, 97, 1370, 365, 178, 89, 1682, 85, 1850, 137, 106, 533, 2210, 100, 2402, 125, 298, 185, 2810, 117, 146, 113, 370, 845, 3482, 136, 3722, 965, 130
OFFSET
2,1
EXAMPLE
a(2) = 5 because 5-4 and 5+4 are both square,
a(3) = 10 because 10-6 and 10+6 are both square,
a(4) = 17 because 17-8 and 17+8 are both square,
a(5) = 26 because 26-10 and 26+10 are both square.
MATHEMATICA
s = {}; Do[x = a+1; While[!IntegerQ[Sqrt[a+x]] || !IntegerQ[Sqrt[x-a]], x++]; AppendTo[s, x], {a, 4, 130, 2}]; s
PROG
(PARI) a(n) = my(m=2*n+1); while (!issquare(m-2*n) || !issquare(m+2*n), m++); m; \\ Michel Marcus, Mar 27 2021
CROSSREFS
Sequence in context: A276382 A105705 A061409 * A229997 A277186 A193053
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 27 2021
STATUS
approved