A357302 Numbers k such that k^2 can be represented as x^2 + x*y + y^2 in more ways than for any smaller k.
1, 7, 49, 91, 637, 1729, 12103, 53599, 375193, 1983163, 13882141, 85276009, 596932063, 4178524441, 5201836549, 36412855843, 254889990901, 348523048783, 2439661341481, 17077629390367, 25442182561159, 178095277928113, 1246666945496791, 2009932422331561, 14069526956320927
Offset: 1
Keywords
Examples
The essential information in the complete set of representations of a square a(n)^2 can be extracted by taking into account the symmetries of the triangular lattice. If r is the number of all representations of a(n)^2, then there are t = (r/6 + 1)/2 pairs of triangular oblique coordinates lying in a sector of angular width Pi/6 completely containing the essential information. a(1) = 1: r = 6 representations of 1^2 are [-1, 0], [-1, 1], [0, -1], [0, 1], [1, -1], [1, 0] reduced: (6/6 + 1)/2 = 1 grid point [1,0]. a(2) = 7: r = 18 representations of 7^2 = 49 are [-8, 5], [-7, 0], [-7, 7], [-5, -3], [-5, 8], [-3, -5], [-3, 8], [0, -7], [0, 7], [3, -8], [3, 5], [5, -8], [5, 3], [7, -7], [7, 0], [8, -5], [8, -3], [8, 3]; reduced: (18/6 + 1)/2 = 2 grid points [7, 0], [8, 3]. After a(2) = 7 there are no squares with more than 18 representations, e.g., r = 18 for 13^2, 14^2, 19^2, 21^2, ..., 42^2, 43^2. a(3) = 49: r = 30 representations of 49^2 = 2401 are [-56, 21], [-56, 35], [-55, 16], [-55, 39], [-49, 0], [-49, 49], [-39, -16], [-39, 55], [-35, -21], [-35, 56], [-21, -35], [-21, 56], [-16, -39], [-16, 55], [0, -49], [0, 49], [16, -55], [16, 39], [21, -56], [21, 35], [35, -56], [35, 21], [39, -55], [39, 16], [49, -49], [49, 0], [55, -39], [55, -16], [56, -35], [56, -21]; reduced: (30/6 + 1)/2 = 3 grid points [49, 0], [55, 16], [56, 21]. There are no squares with r > 18 between 49 and 90. a(4) = 91: r = 54 representations of 91^2 = 8281 are [-105,49], [-105,56], ..., [105, -56], [105,-49]; reduced: (54/6 + 1)/2 = 5 grid points [91, 0], [96, 11], [99, 19], [104, 39], [105, 49].
Programs
-
PARI
a357302(upto) = {my (dmax=0);for (k = 1, upto, my (d = #qfbsolve (Qfb(1,1,1), k^2, 3)); if(d > dmax, print1(k,", "); dmax=d))}; a357302(400000)
-
PARI
\\ more efficient using function list_A344473 (see there) a355703(maxexp10)= {my (sqterms=select(x->issquare(x), list_A344473 (10^(2*maxexp10))), r=0); for (k=1, #sqterms, my (d = #qfbsolve(Qfb(1,1,1),v[k],3)); if (d>r, print1(sqrtint(v[k]),", "); r=d))}; a355703(17)
-
Python
from itertools import count, islice from sympy.abc import x,y from sympy.solvers.diophantine.diophantine import diop_quadratic def A357302_gen(): # generator of terms c = 0 for k in count(1): if (d:=len(diop_quadratic(x*(x+y)+y**2-k**2))) > c: yield k c = d A357302_list = print(list(islice(A357302_gen(),6))) # Chai Wah Wu, Sep 26 2022
Comments