A374090 a(n) is the smallest nonnegative integer k where exactly n ordered pairs of positive integers (x, y) exist such that x^2 + x*y + y^2 = k.
0, 3, 7, 147, 91, 7203, 637, 352947, 1729, 24843, 31213, 847425747, 12103, 41523861603, 405769, 1217307, 53599, 99698791708803, 157339, 4885240793731347, 593047, 59648043
Offset: 0
Programs
-
Python
from itertools import count from sympy.abc import x,y from sympy.solvers.diophantine.diophantine import diop_quadratic def A374090(n): return next(m for m in (3*k**2 if n&1 else k for k in count(0)) if sum(1 for d in diop_quadratic(x*(x+y)+y**2-m) if d[0]>0 and d[1]>0) == n) # Chai Wah Wu, Jun 28 2024
Formula
a(2*n) = A374094(n).
Extensions
a(11), a(13) from Chai Wah Wu, Jun 28 2024
a(17) from Bert Dobbelaere, Jun 28 2024
a(19) from Bert Dobbelaere, Jun 30 2024
Comments