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
KEYWORD
nonn
AUTHOR
Luca Onnis, Aug 27 2022
STATUS
approved