[go: up one dir, main page]

login
A307985
Number of integer-sided triangles with perimeter n and sides a, b, and c such that a <= b <= c and b|n.
1
0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 3, 0, 0, 3, 0, 0, 4, 0, 0, 4, 0, 0, 5, 0, 0, 5, 0, 0, 6, 0, 0, 6, 0, 0, 7, 0, 0, 7, 0, 0, 8, 0, 0, 8, 0, 0, 9, 0, 0, 9, 0, 0, 10, 0, 0, 10, 0, 0, 11, 0, 0, 11, 0, 0, 12, 0, 0, 12, 0, 0, 13, 0, 0, 13, 0, 0, 14, 0, 0
OFFSET
1,9
COMMENTS
Since n = a+b+c < a+b+a+b <= 4*b, n = a+c+b > b+b, we have n/2 > b > n/4, hence b = n/3. Write a = n/3 - t, c = n/3 + t, then a+b > c <=> 0 < = t < n/6. As a result, we have a(6*k) = a(6*k-3) = k, k >= 1 and a(n) = 0 if n is not divisible by 3. - Jianing Song, Oct 23 2022
FORMULA
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1)) * (1 - ceiling(n/i) + floor(n/i)).
Conjectures from Colin Barker, May 15 2019: (Start)
G.f.: x^3 / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)^2).
a(n) = a(n-3) + a(n-6) - a(n-9) for n>9.
(End) [The conjectures are correct. - Jianing Song, Oct 23 2022]
a(n) = ceiling(n/6) = A110654(n/3) for n divisible by 3; otherwise a(n) = 0. - Jianing Song, Oct 23 2022
MATHEMATICA
Table[Sum[Sum[(1 - Ceiling[n/i] + Floor[n/i]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
PROG
(PARI) a(n) = if(n%3, 0, ceil(n/6)) \\ Jianing Song, Oct 23 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 15 2019
STATUS
approved