cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A077035 #12 Jul 29 2023 06:41:08
%S A077035 7,24,25,60,65,72,97,4704,4705,11292,12233,79044,79985,124212,147737,
%T A077035 430416,455065,504072,679097,24502296,24511705,34278300,42140545,
%U A077035 68012700,80009705,192023292,208025233,356427144,412692145,990461148,1072999577,2403086064,2631758105
%N 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.
%C A077035 Note that each time two more terms are added simultaneously.
%e A077035 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.
%o A077035 (Python)
%o A077035 from math import isqrt
%o A077035 from sympy.ntheory.primetest import is_square
%o A077035 def aupton(terms):
%o A077035     alst = [7]
%o A077035     for n in range(2, terms+1, 2):
%o A077035         sq1, an = alst[-1]**2, alst[-1] + 1
%o A077035         while not is_square(sq1 + an**2): an += 1
%o A077035         alst.extend([an, isqrt(sq1 + an**2)])
%o A077035     return alst[:terms]
%o A077035 print(aupton(19)) # _Michael S. Branicky_, Jul 24 2021
%Y A077035 Cf. A077034, A076604.
%K A077035 nonn
%O A077035 1,1
%A A077035 _Zak Seidov_, Oct 21 2002
%E A077035 a(16) and beyond from _Michael S. Branicky_, Jul 24 2021