OFFSET
1,1
COMMENTS
From Robert Israel, Apr 03 2023: (Start)
Includes m^2 for m >= 2: for k = m^2. take t = 2, r = (m^2 - m)/2, s = (m^2 + m)/2.
Includes A152618(n) = (n-1)^2*(n+1) for n >= 3: take t = n - 1, r = n^2 - n, s = n^3 - 2*n^2 + 1.
Another infinite family of solutions: t = 3, r = y - 1, s = (x + 3*y)/2 - 1, k = (x + 5*y)/2 - 2 where x and y satisfy the Pell-type equation x^2 + 4 = 5*y^2.
(End)
EXAMPLE
9 is in the sequence since 9 = 3^2 - 2*3*6 + 6^2.
MAPLE
N:= 3000: # for terms <= N
R:= {4}:
for t from 2 to N/2 do
for r from t+1 to N/2 do
c:= r^2-r;
b:= 1+t*r;
delta:= b^2 - 4*c;
if not issqr(delta) then next fi;
delta:= sqrt(delta);
S:= select(x -> x::posint and x >= r and r+x <= N, {(b+delta)/2, (b-delta)/2});
R:= R union map(`+`, S, r);
od od:
sort(convert(R, list)); # Robert Israel, Apr 04 2023
MATHEMATICA
Table[If[Sum[Sum[KroneckerDelta[i^2 - k*i (n - i) + (n - i)^2, n], {k, i - 1}], {i, Floor[n/2]}] > 0, n, {}], {n, 200}] // Flatten
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 04 2020
STATUS
approved