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.

A046129 Middle side b of scalene integer Heronian triangles sorted by increasing c and b.

Original entry on oeis.org

4, 8, 12, 12, 13, 14, 10, 15, 13, 15, 16, 17, 20, 17, 20, 24, 24, 25, 25, 25, 21, 25, 24, 25, 26, 28, 29, 20, 30, 28, 29, 34, 29, 20, 26, 30, 35, 25, 28, 34, 35, 36, 26, 30, 32, 37, 39, 28, 40, 40, 34, 40, 37, 39, 36, 39, 40, 42, 35, 34, 40, 41, 41, 48, 30, 35, 37, 38, 40
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    sideMax = 60; r[c_] := Reap[Do[ p = (a + b + c)/2; red = Reduce[ area > 1 && a < b < c && area^2 == p*(p - a)*(p - b)*(p - c), area, Integers]; If[red =!= False, sol = {a, b, c, area} /. {ToRules[red]}; Sow[sol]], {b, 1, c - 1}, {a, c - b, b - 1}]]; triangles = Flatten[ Reap[ Do[rc = r[c]; If[rc[[2]] =!= {}, Sow[rc[[2, 1]]]], {c, 5, sideMax}]][[2, 1]] , 2]; Sort[ triangles, Which[#1[[3]] < #2[[3]], True, #1[[3]] > #2[[3]], False, #1[[2]] < #2[[2]], True,  #1[[2]] > #2[[2]], False, #1[[1]] <= #2[[1]], True, True, False] &][[All, 2]] (* Jean-François Alcover, Oct 29 2012 *)