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.

Showing 1-2 of 2 results.

A229746 Integer areas of integer-sided triangles where two sides are of prime length.

Original entry on oeis.org

6, 12, 30, 60, 66, 72, 114, 120, 180, 210, 240, 330, 336, 360, 396, 420, 456, 660, 756, 780, 840, 900, 984, 1116, 1200, 1248, 1260, 1290, 1320, 1584, 1590, 1680, 1710, 1716, 1770, 1800, 1980, 2100, 2310, 2400, 2460, 2496, 2520, 2604, 2640, 2940, 2970, 3060, 3120
Offset: 1

Views

Author

Michel Lagneau, Sep 28 2013

Keywords

Comments

Subset of A188158. The length of the third side is an even composite number because the perimeter is always even.
The area of the triangles (a,b,c) are given by Heron's formula A = sqrt(s(s-a)(s-b)(s-c)) where its side lengths are a, b, c and semiperimeter s = (a+b+c)/2.
The following table gives the first values (A, a, b, c):
***********************
* A * a * b * c *
***********************
* 6 * 3 * 4 * 5 *
* 12 * 5 * 5 * 6 *
* 12 * 5 * 5 * 8 *
* 30 * 5 * 12 * 13 *
* 60 * 10 * 13 * 13 *
* 66 * 11 * 13 * 20 *
* 72 * 5 * 29 * 30 *
* 114 * 19 * 20 * 37 *
* 120 * 16 * 17 * 17 *
* 120 * 17 * 17 * 30 *
* 180 * 13 * 30 * 37 *
....................

Examples

			114 is in the sequence because the triangle (19, 20, 37) => semiperimeter s = (19+20+37)/2 = 38, and A = sqrt(38*(38-19)*(38-20)*(38-37)) = 114, with 19 and 37 prime numbers.
		

Crossrefs

Programs

  • Mathematica
    area[a_, b_, c_] := Module[{s = (a + b + c)/2, a2}, a2 = s (s - a) (s - b) (s - c); If[a2 < 0, 0, Sqrt[a2]]]; goodQ[a_, b_, c_] := Module[{ar = area[a, b, c]}, ar > 0 && IntegerQ[ar]]; nn = 80; t = {}; ps = Prime[Range[2, nn]]; mx = 3*ps[[-1]]; Do[If[p <= q && goodQ[p, q, e], aa = area[p, q, e]; If[aa <= mx, AppendTo[t, aa]]], {p, ps}, {q, ps}, {e, q - p + 2, p + q - 2, 2}]; t = Union[t] (* T. D. Noe, Oct 01 2013 *)

Extensions

Extended by T. D. Noe, Sep 30 2013
Missing term 2970 from Giovanni Resta, Mar 08 2017

A227112 Numbers n such that there exist two primes p and q where the area A of the triangle of sides (n, p, q) is an integer.

Original entry on oeis.org

4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 26, 30, 38, 40, 42, 50, 56, 60, 68, 70, 78, 80, 90, 96, 100, 102, 104, 110, 120, 130, 144, 148, 150, 156, 160, 170, 174, 180, 182, 198, 210, 224, 234, 240, 286, 290, 300, 312, 350, 360, 370, 390, 400, 440, 510, 520, 548
Offset: 1

Views

Author

Michel Lagneau, Oct 02 2013

Keywords

Comments

n is an even composite number because the perimeter of the triangle (n, p, q) is always even. The corresponding areas are {6, 12, 12, 60, 30, 120, 360, 66, ...}
The area is given by Heron's formula A = sqrt(s(s-n)(s-p)(s-q)) where the semiperimeter s = (n + p + q)/2.
The following table gives the first values (n, A, p, q).
+----+-----+----+----+
| n | A | p | q |
+----+-----+----+----+
| 4 | 6 | 3 | 5 |
| 6 | 12 | 5 | 5 |
| 8 | 12 | 5 | 5 |
| 10 | 60 | 13 | 13 |
| 12 | 30 | 5 | 13 |
| 16 | 120 | 17 | 17 |
| 18 | 360 | 41 | 41 |
| 20 | 66 | 11 | 13 |
...

Examples

			12 is in the sequence because the triangle (12, 5, 13) => semiperimeter s = (12+5+13)/2 = 15, and A = sqrt(15*(15-12)*(15-5)*(15-13))= 30, with 5 and 13 prime numbers.
		

Crossrefs

Programs

  • Mathematica
    area[a_, b_, c_] := Module[{s = (a + b + c)/2, a2}, a2 = s (s - a) (s - b) (s - c); If[a2 < 0, 0, Sqrt[a2]]]; goodQ[a_, b_, c_] := Module[{ar = area[a, b, c]}, ar > 0 && IntegerQ[ar]]; nn = 300; t = {}; ps = Prime[Range[2, nn]]; mx = 3*ps[[-1]]; Do[If[p <= q && goodQ[p, q, e], aa = area[p, q, e]; If[aa <= mx, AppendTo[t, e]]], {p, ps}, {q, ps}, {e, q - p + 2, p + q - 2, 2}]; t = Union[t] (* program from T. D. Noe adapted for this sequence - see A229746 *)
Showing 1-2 of 2 results.