A361197 a(n) is the number of equations in the set {x^2 + 2y^2 = n, 2x^2 + 3y^2 = n, ..., k*x^2 + (k+1)*y^2 = n, ..., n*x^2 + (n+1)*y^2 = n} which admit at least one nonnegative integer solution.
1, 2, 3, 3, 3, 3, 3, 4, 4, 2, 5, 5, 3, 3, 3, 5, 4, 4, 5, 5, 5, 3, 3, 6, 4, 3, 6, 5, 5, 3, 5, 6, 4, 4, 4, 8, 3, 3, 5, 4, 6, 2, 5, 8, 6, 3, 3, 7, 6, 4, 6, 6, 4, 6, 3, 7, 4, 2, 7, 5, 6, 3, 6, 8, 3, 5, 5, 6, 7, 2, 5, 8, 4, 4, 6, 8, 4, 2, 6, 7, 8, 4, 5, 9, 3, 5, 4, 5, 6, 4, 6, 5, 4, 3, 4, 9
Offset: 1
Keywords
Examples
a(5) = 3. Consider the equations: x^2 + 2y^2 = 5, 2x^2 + 3y^2 = 5, 3x^2 + 4y^2 = 5, 4x^2 + 5y^2 = 5, 5x^2 + 6y^2 = 5. Only three of them admit at least one nonnegative integer solution, since 3x^2 + 4y^2 = 5 and x^2 + 2y^2 = 5 have no nonnegative integer solutions.
Crossrefs
Cf. A356770.
Programs
-
Mathematica
b[m_] := m; f[n_] := Table[Dimensions[Solve[b[k]*x^2 + b[k + 1]*y^2 == n, {x, y}, NonNegativeIntegers]][[1]], {k, 1, n}];
Comments