login
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.
0

%I #16 Mar 04 2023 15:25:29

%S 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,

%T 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,

%U 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

%N 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.

%C Compared to the "linear" case given by A356770, the "quadratic" case given by this sequence has a more chaotic behavior.

%C a(n) >= 2 for all n > 1 since (n-1)*x^2 + n*y^2 = n and n*x^2 + (n+1)*y^2 = n always admit one integer solution (respectively (0,1) and (1,0)).

%C Conjecture: a(n) = 2 for infinitely many n.

%e 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.

%t b[m_] := m;

%t f[n_] := Table[Dimensions[Solve[b[k]*x^2 + b[k + 1]*y^2 == n, {x, y}, NonNegativeIntegers]][[1]], {k, 1, n}];

%Y Cf. A356770.

%K nonn

%O 1,2

%A _Luca Onnis_, Mar 04 2023