A296303 Number of minimal nonnegative nonzero solutions of the linear Diophantine equation x_1 + 2*x_2 + ... + n*x_n = y_1 + 2*y_2 + ... + n*y_n.
1, 4, 13, 34, 99, 210, 559, 1164, 2531, 4940, 10735
Offset: 1
Examples
The 13 minimal solutions for n=3 are (x-coordinates followed by y-coordinates): (0,0,1;0,0,1), (0,0,1;1,1,0), (0,0,1;3,0,0), (0,0,2;0,3,0), (0,1,0;0,1,0), (0,1,0;2,0,0), (0,2,0;1,0,1), (0,3,0;0,0,2), (1,0,0;1,0,0), (1,0,1;0,2,0), (1,1,0;0,0,1), (2,0,0;0,1,0), (3,0,0;0,0,1).
Links
- M. Clausen, A. Fortenbacher, Efficient solution of linear Diophantine equations, J. Symbolic Comput. 8 (1989), 201-216.
- D. V. Pasechnik, On computing Hilbert bases via the Elliott-MacMahon algorithm, Theor. Comp. Sc. 263 (2001), 37-46.
- K. Pommerening, The indecomposable solutions of linear Diophantine equations
Programs
-
Python
See Pommerening link.
Comments