OFFSET
1,2
COMMENTS
The program generates solutions to the problem, but not necessarily all solutions. To exclude the existence of further solution you have to apply coset arithmetics (modulo operations).
EXAMPLE
k = 1: 3^2 + 4^2 = 5^2.
k = 2: 3^2 + 4^2 = 3^2 + 4^2.
k = 3: 13^2 + 14^2 = 10^2 + 11^2 + 12^2.
k = 10: 26^2 + 27^2 = 7^2 + ... + 16^2.
k = 17: 40^2 + 41^2 = 5^2 + ... + 21^2.
k = 25: 78^2 + 79^2 = 9^2 + ... + 33^2.
k = 26: 205^2 + 206^2 = 44^2 + ... + 49^2.
k = 34: 856^2 + 857^2 = 191^2 + ... + 224^2.
k = 41: 3029^2 + 3030^2 = 649^2 + ... + 689^2.
k = 50: 146^2 + 147^2 = 1^2 + ... + 50^2.
k = 51: 210^2 + 211^2 = 14^2 + ... + 64^2.
k = 65: 236^2 + 237^2 = 5^2 + ... + 69^2.
k = 73: 278^2 + 279^2 = 5^2 + ... + 76^2.
k = 82: 1070^2 + 1071^2 = 125^2 + ... + 206^2.
k = 89: 147445^2 + 147446^2 = 22059^2 + ... + 22147^2.
k = 97: 544^2 + 545^2 = 25^2 + ... + 121^2.
MATHEMATICA
Select[Range[60], {} != FindInstance[ Sum[t^2, {t, x, x+#-1}] == y^2 + (y + 1)^2, {x, y}, Integers] &] (* Giovanni Resta, Oct 23 2019 *)
PROG
(Python)
import math
for n in range(1, 100):
for b in range(1, 10000000):
d = (6*b*b*(n+1)+6*b*n*(n+1)+2*n*n*n+3*n*n+n)
w = int((math.sqrt(d/6)))
a = w
if 6*a*a-6*b*b*(n+1)-6*b*n*(n+1)-2*n*n*n-3*n*n-n == 0:
print(a, b, n+1)
a = w+1
if 6*a*a-6*b*b*(n+1)-6*b*n*(n+1)-2*n*n*n-3*n*n-n == 0:
print(a, b, n+1)
a = w-1
if 6*a*a-6*b*b*(n+1)-6*b*n*(n+1)-2*n*n*n-3*n*n-n == 0:
print(a, b, n+1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reiner Moewald, Oct 13 2019
EXTENSIONS
a(17)-a(38) from Jon E. Schoenfield, Oct 22 2019
a(39)-a(57) from Jon E. Schoenfield and Giovanni Resta, Oct 23 2019
STATUS
approved