login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A356770
a(n) is the number of equations in the set {x+2y=n, 2x+3y=n, ..., k*x+(k+1)*y=n, ..., n*x+(n+1)*y=n} which admit at least one nonnegative integer solution.
2
1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 6, 8, 7, 8, 8, 9, 8, 10, 8, 10, 10, 10, 9, 12, 10, 11, 11, 12, 10, 13, 11, 13, 12, 12, 12, 15, 12, 13, 13, 15, 12, 15, 13, 15, 15, 14, 13, 17, 14, 16, 15, 16, 14, 17, 15, 17, 16, 16, 15, 20, 15, 16, 17, 18, 17, 19, 16, 18, 17, 19, 16, 21, 17, 18, 19, 19
OFFSET
1,2
COMMENTS
a(n) = ceiling(2*(sqrt(n)-1)) + ceiling(A000005(n)/2).
EXAMPLE
a(5) = 4. Consider the equations: x+2y=5, 2x+3y=5, 3x+4y=5, 4x+5y=5, 5x+6y=5. Only four of them admit at least one nonnegative integer solution, since 3x+4y=5 has no nonnegative integer solution.
MATHEMATICA
b[m_] := m;
f[n_] := Table[Dimensions[Solve[b[k]*x + b[k + 1]*y == n, {x, y}, NonNegativeIntegers]][[1]], {k, 1, n}];
Flatten[Table[Dimensions[DeleteCases[f[k], 0]], {k, 1, 100}]]
CROSSREFS
Cf. A000005.
Sequence in context: A196162 A071940 A085883 * A265912 A094192 A093874
KEYWORD
nonn
AUTHOR
Luca Onnis, Aug 27 2022
STATUS
approved