Integer Triangle

DOWNLOAD Mathematica Notebook

The number of different triangles which have integer side lengths and perimeter n is

T(n)=P(n,3)-sum_(1<=j<=|_n/2_|)P(j,2)
(1)
=[(n^2)/(12)]-|_n/4_||_(n+2)/4_|
(2)
={[(n^2)/(48)] for n even; [((n+3)^2)/(48)] for n odd,
(3)

where P(n,k) is the partition function giving the number of ways of writing n as a sum of exactly k terms, [x] is the nearest integer function, and |_x_| is the floor function (Andrews 1979, Jordan et al. 1979, Honsberger 1985). A slightly complicated closed form is given by

 T(n)=1/(288)[6n^2+18n-9(2n+3)(-1)^n-1 
 +36sin(1/2pin)-36cos(1/2pin)+64cos(2/3pin)].
(4)

The values of T(n) for n=1, 2, ... are 0, 0, 1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7, 5, 8, 7, 10, 8, 12, 10, 14, 12, 16, ... (OEIS A005044), which is also Alcuin's sequence padded with two initial 0s.

The generating function for T(n) is given by

G(x)=(x^3)/((1-x^2)(1-x^3)(1-x^4))
(5)
=sum_(n=0)^(infty)T(n)x^n
(6)
=x^3+x^5+x^6+2x^7+x^8+3x^9+....
(7)

T(n) also satisfies

 T(2n)=T(2n-3)=P(n,3).
(8)

It is not known if a triangle with integer sides, triangle medians, and area exists (although there are incorrect proofs of the impossibility in the literature). However, R. L. Rathbun, A. Kemnitz, and R. H. Buchholz have shown that there are infinitely many triangles with rational sides (Heronian triangles) with two rational triangle medians (Guy 1994).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.