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.

A070083 Perimeters of integer triangles, sorted by perimeter, sides lexicographically ordered.

This page as a plain text file.
%I A070083 #20 Jul 09 2017 16:15:14
%S A070083 3,5,6,7,7,8,9,9,9,10,10,11,11,11,11,12,12,12,13,13,13,13,13,14,14,14,
%T A070083 14,15,15,15,15,15,15,15,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,
%U A070083 18,18,18,18,18,19,19,19,19,19,19,19,19,19
%N A070083 Perimeters of integer triangles, sorted by perimeter, sides lexicographically ordered.
%C A070083 A005044(p) is the number of all integer triangles having perimeter p.
%H A070083 R. Zumkeller, <a href="/A070080/a070080.txt">Integer-sided triangles</a>
%F A070083 a(n) = A070080(n) + A070081(n) + A070082(n).
%t A070083 maxPer = 19; maxSide = Floor[(maxPer-1)/2]; order[{a_, b_, c_}] := (a+b+c)*maxPer^3 + a*maxPer^2 + b*maxPer + c; triangles = Reap[Do[If[ a+b+c <= maxPer && c-b < a < c+b && b-a < c < b+a && c-a < b < c+a, Sow[{a, b, c}]], {a, 1, maxSide}, {b, a, maxSide}, {c, b, maxSide}]][[2, 1]]; Total /@ Sort[triangles, order[#1] < order[#2] &] (* _Jean-François Alcover_, Jun 12 2012 *)
%t A070083 maxPer = m = 22; sides[per_] := Select[Reverse /@ IntegerPartitions[per, {3}, Range[Ceiling[per/2]]], #[[1]] < per/2 && #[[2]] < per/2 && #[[3]] < per/2&]; triangles = DeleteCases[Table[ sides[per], {per, 3, m}], {}] // Flatten[#, 1]& // SortBy[Total[#] m^3 + #[[1]] m^2 + #[[2]] m + #[[1]]&]; Total /@ triangles (* _Jean-François Alcover_, Jul 09 2017 *)
%K A070083 nonn
%O A070083 1,1
%A A070083 _Reinhard Zumkeller_, May 05 2002