OFFSET
1,2
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Sascha Kurz, May 04 2005
STATUS
approved