login
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.
1

%I #55 Nov 24 2022 18:27:27

%S 0,2,4,10,16,18,20,26,36,50,64,68,80,82,90,98,100,122,144,148,162,170,

%T 180,196,226,234,242,250,256,260,272,290,320,324,338,362,400,404,442,

%U 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 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 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 Numbers of the form m^2*(k^2 + 1) for integers m and k of the same parity.

%C Chords starting at the origin (z=0, or m=k) are terms A071253(x).

%H Nicolay Avilov, <a href="/A358317/a358317.jpg">Explanatory drawing</a>

%H Nicolay Avilov, <a href="/A358317/a358317_1.jpg">Multiplication table for sequence</a>

%e 0 is a term since it is the square of the chord length from (0,0) to (0,0).

%e 10 = 1^2 + 3^2 is a term since it is the square of the chord length from (1,1) to (2,4).

%o (Python)

%o # Program from Oleg Sorokin

%o from math import isqrt

%o limit = 2000

%o s = set()

%o end = isqrt(limit)

%o for m in range(0, end+1):

%o for k in range(m%2, end+1, 2):

%o c = m**2*(k**2+1)

%o if c > limit:

%o break

%o s.add(c)

%o print(sorted(s))

%o (Python)

%o from itertools import count, islice

%o from sympy import divisors, integer_nthroot

%o def A358317_gen(startvalue=0): # generator of terms >= startvalue

%o for n in count(max(startvalue,0)):

%o if n == 0:

%o yield 0

%o else:

%o for d in divisors(n,generator=True):

%o a, b = integer_nthroot(d,2)

%o if b:

%o c, e = integer_nthroot(n//d-1,2)

%o if e and not (c^a)&1:

%o yield n

%o break

%o A358317_list = list(islice(A358317_gen(),30)) # _Chai Wah Wu_, Nov 24 2022

%Y Cf. A001481, A071253.

%K nonn

%O 1,2

%A _Nicolay Avilov_, Nov 09 2022