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.

A105659 Number of different characteristics, this is the squarefree part of (a+b+c)(a+b-c)(a-b+c)(-a+b+c), of integral triangles (a,b,c) with diameter n.

Original entry on oeis.org

1, 2, 4, 5, 8, 11, 12, 16, 18, 22, 28, 28, 35, 38, 49, 50, 57, 65, 75, 74, 87, 83, 112, 111, 114, 120, 135, 146, 175, 168, 196, 185, 213, 222, 219, 234, 267, 270, 293, 306, 339, 333, 386, 348, 365, 420, 460, 431, 445, 436, 490, 480, 577, 511, 549, 559, 610, 635
Offset: 1

Views

Author

Sascha Kurz, May 04 2005

Keywords

Examples

			a(3)=4 because the integral triangles with diameter 3 are (3,2,2), (3,3,1), (3,3,2), (3,3,3) and the characteristics are 7, 35, 2, 3.
		

Programs

  • Mathematica
    SquareFreePart[n_] := Times @@ Apply[Power, ({#1[[1]], Mod[#1[[2]], 2]} & ) /@ FactorInteger[n], {1}]; SquareFreePart[{a_, b_, c_}] := SquareFreePart[ (a+b+c)*(a+b-c)*(a-b+c)*(-a+b+c)]; ok[{a_, b_, c_}] := a-b < c < a+b && a-c < b < a+c && b-c < a < b+c; triangles[a_] := Reap[Do[ If[ok[{a, b, c}], Sow[{a, b, c}]], {b, 1, a}, {c, 1, b}]][[ 2, 1]]; a[n_] := Length[ Union[ SquareFreePart /@ triangles[n]]]; Table[a[n], {n, 1, 58}] (* Jean-François Alcover, Sep 11 2012 *)