A212109 Number of (w,x,y,z) with all terms in {1,...,n} and w*x-y*z<=n.
0, 1, 15, 69, 203, 467, 935, 1661, 2770, 4326, 6476, 9280, 13025, 17635, 23475, 30614, 39319, 49557, 61969, 76227, 93166, 112525, 134801, 159969, 189233, 221589, 258185, 299022, 344875, 395057, 451641, 512851, 580999, 655166, 736374
Offset: 0
Keywords
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w*x <= y*z + n, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 40]] (* A212109 *) (* Peter J. C. Moses, Apr 13 2012 *)
Comments