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.
%I A358317 #55 Nov 24 2022 18:27:27 %S A358317 0,2,4,10,16,18,20,26,36,50,64,68,80,82,90,98,100,122,144,148,162,170, %T A358317 180,196,226,234,242,250,256,260,272,290,320,324,338,362,400,404,442, %U A358317 450,484,490,500,530,576,578,580,592,612,626,650,676,720,722,730,738,784,788,810,842,882,900,962,980 %N A358317 Ordered squares of the chord lengths of the parabola y=x^2, where the chord ends are all possible points of the parabola with integer coordinates. %C A358317 Numbers of the form (x^2 - z^2)^2 + (x-z)^2 for integers x and z, so that terms are sums of 2 squares (subset of A001481). %C A358317 Numbers of the form m^2*(k^2 + 1) for integers m and k of the same parity. %C A358317 Chords starting at the origin (z=0, or m=k) are terms A071253(x). %H A358317 Nicolay Avilov, <a href="/A358317/a358317.jpg">Explanatory drawing</a> %H A358317 Nicolay Avilov, <a href="/A358317/a358317_1.jpg">Multiplication table for sequence</a> %e A358317 0 is a term since it is the square of the chord length from (0,0) to (0,0). %e A358317 10 = 1^2 + 3^2 is a term since it is the square of the chord length from (1,1) to (2,4). %o A358317 (Python) %o A358317 # Program from Oleg Sorokin %o A358317 from math import isqrt %o A358317 limit = 2000 %o A358317 s = set() %o A358317 end = isqrt(limit) %o A358317 for m in range(0, end+1): %o A358317 for k in range(m%2, end+1, 2): %o A358317 c = m**2*(k**2+1) %o A358317 if c > limit: %o A358317 break %o A358317 s.add(c) %o A358317 print(sorted(s)) %o A358317 (Python) %o A358317 from itertools import count, islice %o A358317 from sympy import divisors, integer_nthroot %o A358317 def A358317_gen(startvalue=0): # generator of terms >= startvalue %o A358317 for n in count(max(startvalue,0)): %o A358317 if n == 0: %o A358317 yield 0 %o A358317 else: %o A358317 for d in divisors(n,generator=True): %o A358317 a, b = integer_nthroot(d,2) %o A358317 if b: %o A358317 c, e = integer_nthroot(n//d-1,2) %o A358317 if e and not (c^a)&1: %o A358317 yield n %o A358317 break %o A358317 A358317_list = list(islice(A358317_gen(),30)) # _Chai Wah Wu_, Nov 24 2022 %Y A358317 Cf. A001481, A071253. %K A358317 nonn %O A358317 1,2 %A A358317 _Nicolay Avilov_, Nov 09 2022