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.

Showing 1-7 of 7 results.

A070081 Middle side of integer triangles [A070080(n) <= a(n) <= A070082(n)], sorted by perimeter, sides lexicographically ordered.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 3, 3, 4, 3, 5, 4, 3, 4, 5, 4, 4, 6, 5, 4, 5, 4, 6, 5, 4, 5, 7, 6, 5, 6, 4, 5, 5, 7, 6, 5, 6, 5, 8, 7, 6, 7, 5, 6, 5, 6, 8, 7, 6, 7, 5, 6, 6, 9, 8, 7, 8, 6, 7, 5, 6, 7, 6, 9, 8, 7, 8, 6, 7, 6, 7, 10, 9, 8, 9, 7, 8, 6, 7, 8, 6, 7, 7, 10, 9, 8, 9, 7
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Crossrefs

Programs

  • Mathematica
    m = 55 (* max perimeter *);
    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]]&];
    triangles[[All, 2]] (* Jean-François Alcover, Jul 09 2017 *)

Formula

a(n) = A070083(n) - A070080(n) - A070082(n).

A188158 Area A of the triangles such that A and the sides are integers.

Original entry on oeis.org

6, 12, 24, 30, 36, 42, 48, 54, 60, 66, 72, 84, 90, 96, 108, 114, 120, 126, 132, 144, 150, 156, 168, 180, 192, 198, 204, 210, 216, 234, 240, 252, 264, 270, 288, 294, 300, 306, 324, 330, 336, 360, 378, 384, 390, 396, 408, 420, 432, 456, 462, 468, 480, 486, 504, 510, 522, 528
Offset: 1

Views

Author

Michel Lagneau, Mar 22 2011

Keywords

Comments

The area A of a triangle whose sides have lengths a, b, and c is given by Heron's formula: A = sqrt(s*(s-a)*(s-b)*(s-c)), where s = (a+b+c)/2. A given area often corresponds to more than one triangle; for example, a(9) = 60 for the triangles (a,b,c) = (6,25,29), (8,17,15), (13,13,10) and (13,13,24).
If only primitive integer triangles (that is, the lengths of the sides are coprime) are considered, then the possible areas are 6 times the terms in A083875. - T. D. Noe, Mar 23 2011

Examples

			a(3) = 24 because the area of the triangle whose sides are 4, 15, 13 is given by sqrt(p(p-4)(p-15)(p-13)) = 24, where p = (4 + 15 + 13)/2 = 16.
		

Crossrefs

Programs

  • Maple
    # storage of areas in T(i)
    T:=array(1..4000):nn:=100:k:=1:for a from 1
      to nn do: for b from 1 to nn do: for c from 1 to nn do: p:=(a+b+c)/2 : x:=p*(p-a)*(p-b)*(p-c):   if x>0 then x1:=abs(x):s:=sqrt(x1) :else fi:if s=floor(s) then T[k]:=s:k:=k+1:else
      fi:od:od:od:
    # sort of T(i)
    for jj from 1 to k-1 do: ii:=jj:for k1 from  ii+1 to k-1 do:if T[ii]>T[k1] then ii:=k1:else fi:od: m:=T[jj]:T[jj]:=T[ii]:T[ii]:=m:od:liste:=convert(T,set):print(liste):
    # second program:
    isA188158 := proc(A::integer)
        local Asqr, s,a,b,c ;
        Asqr := A^2 ;
        for s in numtheory[divisors](Asqr) do
            if s^2> A then
            for a from 1 to s-1 do
                if modp(Asqr,s-a) = 0 then
                    for b from a to s-1 do
                        c := 2*s-a-b ;
                        if s*(s-a)*(s-b)*(s-c) = Asqr then
                            return true ;
                        end if;
                    end do:
                end if;
            end do:
            end if;
        end do:
        false ;
    end proc:
    for n from 3 to 600 do
        if isA188158(n) then
            printf("%d,\n",n) ;
        end if;
    end do: # R. J. Mathar, May 02 2018
  • Mathematica
    nn = 528; lst = {}; Do[s = (a + b + c)/2; If[IntegerQ[s], area2 = s (s - a) (s - b) (s - c); If[0 < area2 <= nn^2 && IntegerQ[Sqrt[area2]], AppendTo[lst, Sqrt[area2]]]], {a, nn}, {b, a}, {c, b}]; Union[lst] (* T. D. Noe, Mar 23 2011 *)

A055595 Area of triangles with integer sides and positive integer area, ordered by longest side, then second longest side and finally shortest side.

Original entry on oeis.org

6, 12, 12, 24, 48, 30, 60, 54, 24, 84, 48, 36, 60, 120, 108, 66, 42, 96, 84, 126, 60, 108, 192, 90, 150, 84, 168, 120, 36, 204, 240, 210, 210, 60, 120, 216, 132, 300, 96, 336, 72, 192, 144, 240, 480, 294, 84, 252, 360, 432, 114, 156, 180, 210, 420, 120, 210, 420
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Comments

This is the ordering of triangles used for A316841.

Crossrefs

The sides are given by A055592, A055593, A055594.
Range of values: A188158.

Programs

  • Mathematica
    max = 42; triangles = Reap[Do[s = (a+b+c)/2; area = Sqrt[s*(s-a)*(s-b)*(s-c)]; If[IntegerQ[area] && area > 0, Sow[{a, b, c, area}]], {a, 1, max}, {b, a, max}, {c, b, max}]][[2, 1]]; A055595 = Sort[triangles, #1[[3]]*max^2 + #1[[2]]*max + #1[[1]] < #2[[3]]* max^2 + #2[[2]]*max + #2[[1]] &][[All, 4]](* Jean-François Alcover, Jun 12 2012 *)

Formula

a(n) = sqrt(s(n)*(s(n)-A055592(n))*(s(n)-A055593(n))*(s(n)-A055594(n))) where s(n) = (A055592(n)+A055593(n)+A055594(n))/2 i.e. half the perimeter of the triangle

A055592 Longest side of congruent triangles with integer sides and positive integer area, ordered by longest side, then second longest side and finally shortest side.

Original entry on oeis.org

5, 6, 8, 10, 12, 13, 13, 15, 15, 15, 16, 17, 17, 17, 18, 20, 20, 20, 21, 21, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 28, 29, 29, 30, 30, 30, 30, 30, 30, 30, 32, 34, 34, 34, 35, 35, 35, 36, 36, 37, 37, 37, 37, 37, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 41, 41
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Crossrefs

Programs

  • Mathematica
    max = 41; triangles = Reap[Do[s = (a+b+c)/2; area = Sqrt[s*(s-a)*(s-b)*(s-c)]; If[IntegerQ[area] && area > 0, Sow[{a, b, c, area}]], {a, 1, max}, {b, a, max}, {c, b, max}]][[2, 1]]; A055592 = Sort[triangles, #1[[3]]*max^2 + #1[[2]]*max + #1[[1]] < #2[[3]]* max^2 + #2[[2]]*max + #2[[1]] &][[All, 3]](* Jean-François Alcover, Jun 12 2012 *)

A055594 Shortest side of congruent triangles with integer sides and positive integer area, ordered by longest side, then second longest side and finally shortest side.

Original entry on oeis.org

3, 5, 5, 6, 10, 5, 10, 9, 4, 13, 10, 9, 8, 16, 15, 11, 7, 12, 10, 13, 13, 15, 20, 12, 15, 7, 14, 10, 3, 17, 20, 17, 20, 6, 17, 18, 11, 25, 8, 26, 5, 20, 18, 16, 32, 21, 8, 15, 25, 30, 19, 15, 13, 12, 24, 16, 17, 25, 10, 15, 30, 25, 22, 29, 14, 24, 13, 25, 15, 9, 17, 18, 29, 20, 35
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Crossrefs

Programs

  • Mathematica
    max = 42; triangles = Reap[Do[s = (a+b+c)/2; area = Sqrt[s*(s-a)*(s-b)*(s-c)]; If[IntegerQ[area] && area > 0, Sow[{a, b, c, area}]], {a, 1, max}, {b, a, max}, {c, b, max}]][[2, 1]]; A055594 = Sort[triangles, #1[[3]]*max^2 + #1[[2]]*max + #1[[1]] < #2[[3]]* max^2 + #2[[2]]*max + #2[[1]] &][[All, 1]](* Jean-François Alcover, Jun 12 2012 *)

A070784 Square of second longest side of triangles with sides whose squares are integers and with positive integer area, ordered by longest side, then second longest side and finally shortest side.

Original entry on oeis.org

2, 4, 5, 4, 5, 8, 4, 8, 10, 10, 6, 5, 8, 9, 12, 15, 5, 8, 10, 13, 13, 5, 8, 13, 16, 17, 10, 16, 8, 9, 10, 10, 13, 13, 16, 17, 17, 17, 18, 20, 20, 12, 15, 8, 13, 13, 16, 17, 17, 20, 20, 25, 10, 10, 16, 18, 20, 20, 20, 26, 24, 14, 9, 13, 16, 20, 20, 20, 25, 25, 29, 12, 24, 30, 30, 10
Offset: 1

Views

Author

Henry Bottomley, May 07 2002

Keywords

Examples

			a(6)=8 since the triangle with sides sqrt(9), sqrt(8) and sqrt(5) has area 3.
		

Crossrefs

A336272 Length of longest side of a primitive square Heron triangle, i.e., a triangle with relatively prime integer sides and area the square of a positive integer.

Original entry on oeis.org

17, 26, 120, 370, 392, 567, 680, 697, 847, 1066, 1089, 1183, 1233, 1299, 1371, 1448, 1904, 2009, 2169, 2176, 2281, 2307, 2535, 2600, 2619, 2785, 2845, 2993, 3150, 3370, 3825, 3944, 3983, 4035, 4095, 4290, 4706, 4760, 4879, 4905, 5655, 5811, 5835, 6137, 6375, 6570, 6936, 7202, 7913, 7995
Offset: 1

Views

Author

James R. Buddenhagen, Jul 15 2020

Keywords

Comments

The triangle [a(23)=2535, 2329, 544] with gcd(2329, 544) = 17 is the first square Heron triangle for which the 3 sides [i, j, k] are not pairwise coprime, i.e., max(gcd(i,j), gcd(i,k), gcd(j,k)) > 1, but gcd(i,j,k) = 1. Are there more square Heron triangles with this property? - Hugo Pfoertner, Jul 18 2020
There are other square Heron triangles with this property, e.g. [a(31)=3825, 2704, 1921] with gcd(1921, 3825) = 17; [a(??)=41460721, 38639097, 17536520] with gcd(38639097, 17536520) = 41; [a(??)=153915025, 139641489, 25224736] with gcd(25224736, 153915025) = 17; and [a(??)=4325561361, 3459908000, 1430190961] with gcd(3459908000, 1430190961) = 73. - James R. Buddenhagen, Jul 20 2020
Terms are given with multiplicity, e.g. if there are two primitive square Heron triangles with equal longest sides, that longest side is listed as a term of the sequence twice (this is very rare). - James R. Buddenhagen, Jul 21 2020

Examples

			17 is in the sequence because the triangle with sides [17, 10, 9] has longest side 17 and area 6^2, the square of a positive integer; 26 is in the sequence because the triangle with sides [26, 25, 3] has longest side 26 and has area 6^2, the square of a positive integer.
Triangles with sides [a, b, c] corresponding to the first 8 terms of this sequence are:  [17, 10, 9], [26, 25, 3], [120, 113, 17], [370, 357, 41], [392, 353, 255], [567, 424, 305], [680, 441, 337], [697, 657, 104].
		

Crossrefs

Programs

  • Maple
    # find all square Heron triangles whose longest side is between small and big
    small:=1: big:=700:
    A336272:=[]:triangles:=[]:
    areasq16:=(a+b+c)*(a+b-c)*(a-b+c)*(-a+b+c):
    # a>=b>=c
    for a from small to big do:
      for b from ceil((a+1)/2) to a do:
        for c from a-b+1 to b do:
          if issqr(areasq16) and issqr(sqrt(areasq16)) and igcd(a,b,c)=1 then
            A336272:=[op(A336272),a]:
            triangles:=[op(triangles),[a,b,c]]:
          end if:
        od:
      od:
    od: A336272;triangles;
  • PARI
    for(a=1,1200,for(b=ceil((a+1)/2),a,for(c=a-b+1,b,if(gcd([a,b,c])==1,if(ispower((a+b+c)*(a+b-c)*(a-b+c)*(b+c-a),4),print1(a,", ")))))) \\ Hugo Pfoertner, Jul 18 2020

Extensions

a(42)-a(50) from Hugo Pfoertner, Jul 18 2020
Showing 1-7 of 7 results.