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-5 of 5 results.

A229849 Consider all primitive 120-degree triangles with sides A < B < C. The sequence gives the values of B.

Original entry on oeis.org

5, 8, 16, 24, 33, 35, 39, 45, 51, 56, 57, 63, 77, 80, 85, 88, 91, 95, 105, 112, 115, 120, 143, 145, 155, 160, 161, 165, 168, 175, 187, 192, 195, 203, 208, 209, 217, 221, 224, 231, 247, 253, 259, 261, 272, 273, 279, 280, 287, 288, 299, 301, 304, 315, 320, 323
Offset: 1

Views

Author

Colin Barker, Oct 06 2013

Keywords

Comments

A primitive triangle is one for which the sides have no common factor.
For n>1, A106505(n) seems to give the values of A and A004611(n) seems to give the values of C.

Examples

			33 appears in the sequence because there exists a primitive 120-degree triangle with sides 7, 33 and 37.
		

Crossrefs

Programs

  • PARI
    \\ Gives values of B not exceeding bmax
    \\ e.g. pt120b(80) gives [5, 8, 16, 24, 33, 35, 39, 45, 51, 56, 57, 63, 77, 80]
    pt120b(bmax) = {
      s=[];
      for(m=1, (bmax-1)\2,
        for(n=1, m-1,
          if((m-n)%3!=0 && gcd(m, n)==1,
            a=m*m-n*n;
            b=n*(2*m+n);
            if(a>b, b=a);
            if(b<=bmax, s=concat(s, b))
          )
        )
      );
      vecsort(s,,8)
    }

A264827 (a,b,c) in lexicographic order such that a^2 + b^2 + a*b - c^2 = 0 with a < b < c and gcd(a, b) = 1.

Original entry on oeis.org

3, 5, 7, 5, 16, 19, 7, 8, 13, 7, 33, 37, 9, 56, 61, 11, 24, 31, 11, 85, 91, 13, 35, 43, 13, 120, 127, 15, 161, 169, 16, 39, 49, 17, 63, 73, 17, 208, 217, 19, 80, 91, 19, 261, 271, 21, 320, 331, 23, 120, 133, 23, 385, 397, 24, 95, 109, 25, 143, 157
Offset: 1

Views

Author

Colin Barker, Nov 26 2015

Keywords

Comments

The sides of a primitive 120-degree integer triangle.

Examples

			Triples (a,b,c) begin:
  3,  5,  7;
  5, 16, 19;
  7,  8, 13;
  7, 33, 37;
  9, 56, 61;
  ...
		

Crossrefs

Programs

  • PARI
    pt120(a) = {
      my(L=List(), n=-3*a^2, f, g, b, c);
      fordiv(n, f,
        g=n\f;
        if(f>g && (g+f)%2==0 && (f-g)%4==0,
          c=(f-g)\4; b=((f+g)\2-a)\2;
          if(b>0 && a
    				

A229859 Consider all 120-degree triangles with sides A < B < C. The sequence gives the values of B.

Original entry on oeis.org

5, 8, 10, 15, 16, 20, 24, 25, 30, 32, 33, 35, 39, 40, 45, 48, 50, 51, 55, 56, 57, 60, 63, 64, 65, 66, 70, 72, 75, 77, 78, 80, 85, 88, 90, 91, 95, 96, 99, 100, 102, 104, 105, 110, 112, 114, 115, 117, 120, 125, 126, 128, 130, 132, 135, 136, 140, 143, 144, 145
Offset: 1

Author

Colin Barker, Oct 06 2013

Keywords

Comments

A229858 gives the values of A, and A050931 gives the values of C.

Examples

			20 appears in the sequence because there exists a 120-degree triangle with sides 12, 20 and 28.
		

Crossrefs

Programs

  • PARI
    \\ Gives values of B not exceeding bmax.
    \\ e.g. t120b(40) gives [5, 8, 10, 15, 16, 20, 24, 25, 30, 32, 33, 35, 39, 40]
    t120b(bmax) = {
      v=pt120b(bmax);
      s=[];
      for(i=1, #v,
        for(m=1, bmax\v[i],
          if(v[i]*m<=bmax, s=concat(s, v[i]*m))
        )
      );
      vecsort(s,,8)
    }
    \\ Gives values of B not exceeding bmax in primitive triangles.
    \\ e.g. pt120b(40) gives [5, 8, 16, 24, 33, 35, 39]
    pt120b(bmax) = {
      s=[];
      for(m=1, (bmax-1)\2,
        for(n=1, m-1,
          if((m-n)%3!=0 && gcd(m, n)==1,
            a=m*m-n*n;
            b=n*(2*m+n);
            if(a>b, b=a);
            if(b<=bmax, s=concat(s, b))
          )
        )
      );
      vecsort(s,,8)
    }

A357275 Smallest side of integer-sided primitive triangles whose angles satisfy A < B < C = 2*Pi/3.

Original entry on oeis.org

3, 7, 5, 11, 7, 13, 16, 9, 32, 17, 40, 11, 19, 55, 40, 24, 13, 23, 65, 69, 56, 25, 75, 15, 104, 32, 56, 29, 17, 87, 85, 119, 31, 72, 93, 64, 144, 19, 95, 133, 40, 136, 35, 105, 21, 105, 37, 111, 185, 88, 152, 176, 23, 80, 115, 161, 41, 123, 240, 48, 205, 240, 43, 25, 129, 175, 215, 88
Offset: 1

Author

Bernard Schott, Sep 23 2022

Keywords

Comments

The triples of sides (a,b,c) with a < b < c are in nondecreasing order of largest side c, and if largest sides coincide, then by increasing order of the smallest side. This sequence lists the a's.
For the corresponding primitive triples and miscellaneous properties and references, see A357274.
Solutions a of the Diophantine equation c^2 = a^2 + a*b + b^2 with gcd(a,b) = 1 and a < b.
Also, a is generated by integers u, v such that gcd(u,v) = 1 and 0 < v < u, with a = u^2 - v^2.
This sequence is not increasing. For example, a(2) = 7 for triangle with largest side = 13 while a(3) = 5 for triangle with largest side = 19.
Differs from A088514, the first 20 terms are the same then a(21) = 56 while A088514(21) = 25.
A229858 gives all the possible values of the smallest side a, in increasing order without repetition, but for all triples, not necessarily primitive.
All terms of A106505 are values taken by the smallest side a, in increasing order without repetition for primitive triples, but not all the lengths of this side a are present; example: 3 is not in A106505 (see comment in A229849).

Examples

			a(2) = a(5) = 7 because 2nd and 5th triple are respectively (7, 8, 13) and (7, 33, 37).
		

Crossrefs

Cf. A357274 (triples), this sequence (smallest side), A357276 (middle side), A357277 (largest side), A357278 (perimeter).

Programs

  • Maple
    for c from 5 to 181 by 2 do
    for a from 3 to c-2 do
    b := (-a + sqrt(4*c^2-3*a^2))/2;
    if b=floor(b) and gcd(a, b)=1 and a
    				

Formula

a(n) = A357274(n, 1).

A349772 Consider primitive 120-degree integer triangles with sides A < B < C = A002476(n). This sequence gives the values of A.

Original entry on oeis.org

3, 7, 5, 11, 7, 13, 9, 32, 17, 40, 55, 40, 24, 13, 69, 56, 25, 75, 104, 32, 56, 29, 85, 119, 31, 19, 95, 133, 35, 105, 21, 105, 111, 88, 152, 176, 23, 161, 41, 48, 205, 240, 43, 88, 275, 208, 184, 27, 235, 297, 49, 147, 280, 245, 29, 203, 319, 377, 240, 159, 155, 217, 371, 341, 55, 64, 112
Offset: 1

Author

Seiichi Manyama, Dec 26 2021

Keywords

Examples

			  n | ( A,  B,  C)
----+-------------
  1 | ( 3,  5,  7)
  2 | ( 7,  8, 13)
  3 | ( 5, 16, 19)
  4 | (11, 24, 31)
  5 | ( 7, 33, 37)
  6 | (13, 35, 43)
  7 | ( 9, 56, 61)
  8 | (32, 45, 67)
  9 | (17, 63, 73)
		

Crossrefs

Programs

  • Ruby
    require 'prime'
    def A(n)
      (1..n).each{|a|
        (a + 1..n).each{|b|
          return a if a * a + a * b + b * b == n * n
        }
      }
    end
    def A349772(n)
      ary = []
      i = 1
      while ary.size < n
        ary << A(i) if i.prime? && i % 6 == 1
        i += 1
      end
      ary
    end
    p A349772(100)

Formula

Let B = A350347(n). A^2 + A*B + B^2 = C^2.
Showing 1-5 of 5 results.