OFFSET
1,21
COMMENTS
The order doesn't matter. 21 = 6+15 = 15+6 are not counted as distinct solutions. - N. J. A. Sloane, Feb 22 2020
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
FORMULA
EXAMPLE
a(3) = 1: 2*3/2 + 2*3/2 = 3*4/2.
a(21) = 2: 6*7/2 + 20*21/2 = 12*13/2 + 17*18/2 = 21*22/2.
a(23) = 3: 9*10/2 + 21*22/2 = 11*12/2 + 20*21/2 = 14*15/2 + 18*19/2 = 23*24/2.
MAPLE
a:= proc(n) local h, j, r, w; h, r:= n*(n+1), 0;
for j from n-1 by -1 do w:= j*(j+1);
if 2*w<h then break fi;
if issqr((h-w)*4+1) then r:=r+1 fi
od; r
end:
seq(a(n), n=1..120);
MATHEMATICA
a[n_] := Module[{h = n(n+1), j, r = 0, w}, For[j = n-1, True, j--, w = j(j+1); If[2w < h, Break[]]; If[ IntegerQ[Sqrt[4(h-w)+1]], r++]]; r];
Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Nov 16 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 01 2019
STATUS
approved