A350013 Number of integer-sided triangles with one side having length n and an adjacent angle of 60 degrees.
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
Examples
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}.
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
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
Extensions
More terms from David A. Corneth, Dec 09 2021
Comments