A374159 a(n) is the smallest nonnegative integer k where exactly n pairs of positive integers (x, y) exist such that x^2 + 7*y^2 = k.
0, 8, 32, 128, 352, 704, 1408, 2816, 5632, 11264, 16192, 45056, 32384, 123904, 64768, 178112, 129536, 2883584, 259072, 1982464, 469568, 712448, 1036288, 184549376, 939136, 21551552, 4145152, 2849792, 1878272
Offset: 0
Programs
-
Python
from itertools import count from sympy.abc import x, y from sympy.solvers.diophantine.diophantine import diop_quadratic def A374159(n): return next(m for m in count(0) if sum(1 for d in diop_quadratic(x**2+7*y**2-m) if d[0]>0 and d[1]>0)==n) # Chai Wah Wu, Jun 30 2024
Comments