OFFSET
1,2
COMMENTS
Also integers that can be written in the form k*(k+h), for some integers k>=1 and 0 <= h <= T(k), where T(x) is the number of triangular numbers binomial(x+1,2) not exceeding x. (Corollary 1 in Greg Martin's article) - Hugo Pfoertner, Sep 23 2017
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..600
Greg Martin, Farmer Ted Goes Natural, Math. Mag. 72 (1999), no. 4, 259-276.
Hugo Pfoertner, Plot of R(x). R(x)=A(x)-x^(3/4)*2*sqrt(2)/3-sqrt(x)/2, where A(x) is the number of almost-squares not exceeding x.
MATHEMATICA
chs={1}; For[ n=2, n<=99, n++, chs=Join[ chs, Reverse[ Table[ (n-1-i)(n+i), {i, 0, (Sqrt[ 2n-1 ]-1)/2} ] ], Reverse[ Table[ (n-i)(n+i), {i, 0, n/Sqrt[ 2n-1 ]} ] ] ] ]
(*code uses alternate characterization, lists almost-squares up to 99^2*)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Greg Martin; suggested by Jon Grantham.
STATUS
approved