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.

This page as a plain text file.
%I A105659 #6 Sep 11 2012 08:33:18
%S A105659 1,2,4,5,8,11,12,16,18,22,28,28,35,38,49,50,57,65,75,74,87,83,112,111,
%T A105659 114,120,135,146,175,168,196,185,213,222,219,234,267,270,293,306,339,
%U A105659 333,386,348,365,420,460,431,445,436,490,480,577,511,549,559,610,635
%N 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.
%e A105659 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.
%t A105659 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 *)
%K A105659 nonn
%O A105659 1,2
%A A105659 _Sascha Kurz_, May 04 2005