A125203 Number of ways to write n as 4*x*y - x - y with 1<=x<=y.
0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 0, 2, 1, 0, 1, 0, 0, 1, 2, 0, 1, 0, 0, 2, 0, 1, 1, 0
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a125203 n = length [() | x <- [1 .. (n + 1) `div` 3], let (y,m) = divMod (x + n) (4 * x - 1), x <= y, m == 0] -- Reinhard Zumkeller, Jan 02 2013
-
Mathematica
a[n_] := Solve[1<=x<=y && n == 4 x y - x - y, {x, y}, Integers] // Length; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Oct 12 2021 *)
Comments