login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A350013
Number of integer-sided triangles with one side having length n and an adjacent angle of 60 degrees.
2
1, 1, 2, 1, 3, 2, 3, 4, 3, 3, 3, 2, 3, 3, 7, 6, 3, 3, 3, 3, 7, 3, 3, 7, 5, 3, 4, 3, 3, 7, 3, 8, 6, 3, 10, 3, 3, 3, 6, 11, 3, 7, 3, 3, 10, 3, 3, 12, 5, 5, 6, 3, 3, 4, 10, 10, 6, 3, 3, 7, 3, 3, 10, 10, 10, 6, 3, 3, 6, 10, 3, 10, 3, 3, 11, 3, 10, 6, 3, 18, 5, 3, 3, 7, 9, 3, 6, 10, 3, 10, 10
OFFSET
1,3
COMMENTS
All terms are greater than or equal to 1 because a triangle with side lengths {n, n, n} is equilateral and has an adjacent angle of 60 degrees.
Number of possible integer solutions to the equation n^2 + x^2 - nx = y^2.
x <= n^2 and y <= n^2. - Seiichi Manyama, Dec 09 2021
From David A. Corneth, Dec 10 2021: (Start)
Solving n^2 + x^2 - nx = y^2 for x using the quadratic formula gives x = (n +- sqrt(4*y^2 - 3*n^2)) / 2.
So we need sqrt(4*y^2 - 3*n^2) to be an integer, say k, i.e., sqrt(4*y^2 - 3*n^2) = k.
Squaring gives 4*y^2 - 3*n^2 = k^2, i.e., (2y - k)*(2y + k) = 4*y^2 - k^2 = 3*n^2
Checking divisors d of 3*n^2 gives all candidates for y = (d + 3*n^2/d)/4 and x = (n +- sqrt(4*y^2 - 3*n^2)) / 2 which must be positive. (End)
LINKS
EXAMPLE
For n = 8, there are 4 possible integer triangles with side length 8 and adjacent angle 60 degrees. Their side lengths are {8, 3, 7}, {8, 5, 7}, {8, 8, 8}, {8, 15, 13}.
PROG
(PARI) a(n) = sum(x=1, n^2, issquare(x^2 - n * x + n^2)); \\ David A. Corneth, Dec 09 2021
(PARI) a(n) = { my(n23 = 3*n^2, d = divisors(n23), res = 0); for(i = 1, (#d + 1)\2, y = (d[i] + n23/d[i])/4; if(denominator(y) == 1, x = (n + sqrtint(4*y^2 - n23))/2; if(denominator(x) == 1, res++ ); x = (n - sqrtint(4*y^2 - n23))/2; if(x > 0 && denominator(x) == 1, res++ ); ) ); res } \\ faster than above \\ David A. Corneth, Dec 10 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Joseph C. Y. Wong, Dec 08 2021
EXTENSIONS
More terms from David A. Corneth, Dec 09 2021
STATUS
approved