A077035 a(1)=7; a(n),a(n+1) are smallest > a(n-1) such that a(n-1)^2+a(n)^2=a(n+1)^2.
7, 24, 25, 60, 65, 72, 97, 4704, 4705, 11292, 12233, 79044, 79985, 124212, 147737, 430416, 455065, 504072, 679097, 24502296, 24511705, 34278300, 42140545, 68012700, 80009705, 192023292, 208025233, 356427144, 412692145, 990461148, 1072999577, 2403086064, 2631758105
Offset: 1
Keywords
Examples
a(1)=7 therefore a(2)=24 and a(3)=25: 7^2+24^2=25^2; a(3)=25 therefore a(4)=60 and a(5)=65: 25^2+60^2=65^2.
Programs
-
Python
from math import isqrt from sympy.ntheory.primetest import is_square def aupton(terms): alst = [7] for n in range(2, terms+1, 2): sq1, an = alst[-1]**2, alst[-1] + 1 while not is_square(sq1 + an**2): an += 1 alst.extend([an, isqrt(sq1 + an**2)]) return alst[:terms] print(aupton(19)) # Michael S. Branicky, Jul 24 2021
Extensions
a(16) and beyond from Michael S. Branicky, Jul 24 2021
Comments