cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A096377 Floor of area of triangle with consecutive prime sides.

Original entry on oeis.org

0, 6, 12, 38, 71, 107, 158, 218, 317, 436, 550, 696, 817, 961, 1184, 1425, 1666, 1883, 2134, 2377, 2635, 3008, 3437, 3931, 4351, 4645, 4887, 5199, 5778, 6548, 7484, 7955, 8653, 9237, 10032, 10642, 11389, 12150, 12928, 13653, 14570, 15323, 16232, 16683
Offset: 1

Views

Author

Cino Hilliard, Aug 04 2004

Keywords

Examples

			For triangle with sides 3,5,7 area = (1/4)*sqrt(4*9*49 - (9-25+49)^2) = 6.495...
		

Programs

  • PARI
    area(n) = { for(x=1,n, a=prime(x);b=prime(x+1);c=prime(x+2); z=1/4*sqrt(4*a^2*c^2-(c^2+a^2-b^2)^2); print1(floor(z)",") ) }

Formula

Given a triangle ABC with sides a, b, base c, height h and x=base of right triangle formed by a and h. Then a^2 = h^2+x^2, b^2 = h^2+(c-x)^2, h = sqrt(a^2 - x^2), area = 1/2hc. Hence x = ( a^2-b^2 + c^2)/2c and so area = 1/4*sqrt(4*a^2*c^2-(a^2-b^2+c^2)^2).