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

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

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Colin Barker, Oct 06 2013

Keywords

Comments

A229859 gives the values of B, and A050931 gives the values of C.
This sequence contains every integer larger than 8. - Nathaniel Johnston, Oct 06 2013

Examples

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

Crossrefs

Programs

  • PARI
    \\ Gives values of A not exceeding amax.
    \\ e.g. t120a(20) gives [3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
    t120a(amax) = {
      v=pt120a(amax);
      s=[];
      for(i=1, #v,
        for(m=1, amax\v[i],
          if(v[i]*m<=amax, s=concat(s, v[i]*m))
        )
      );
      vecsort(s,,8)
    }
    \\ Gives values of A not exceeding amax in primitive triangles.
    \\ e.g. pt120a(20) gives [3, 5, 7, 9, 11, 13, 15, 16, 17, 19]
    pt120a(amax) = {
      s=[];
      for(m=1, (amax-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, a=b);
            if(a<=amax, s=concat(s, a))
          )
        )
      );
      vecsort(s,,8)
    }

Formula

a(n) = n+4 for n>4.
a(n) = 2*a(n-1)-a(n-2) for n>6.
G.f.: -x*(x^5-x^4+x^2+x-3) / (x-1)^2.

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).

A357276 Middle side of integer-sided primitive triangles whose angles satisfy A < B < C = 2*Pi/3 = 120 degrees.

Original entry on oeis.org

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

Author

Bernard Schott, Sep 25 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 b's.
For the corresponding primitive triples and miscellaneous properties and references, see A357274.
Solutions b of the Diophantine equation c^2 = a^2 + a*b + b^2 with gcd(a,b) = 1 and a < b.
Also, b is generated by integers u, v such that gcd(u,v) = 1 and 0 < v < u, with b = 2*u*v + v^2.
This sequence is not increasing. For example, a(8) = 56 for triangle with largest side c = 61 while a(9) = 45 for triangle with largest side c = 67.
Differs from A088586, the first 20 terms are the same then a(21) = 115 while A088586(21) = 143.
A229849 gives all the possible values of the middle side b, in increasing order without repetition, for primitive triples, while A229859 gives all the possible values of the middle side b, in increasing order without repetition, but for all triples, not necessarily primitive.

Examples

			a(17) = a(18) = 120 since 17th and 18th triples are respectively (13, 120, 127) and (23, 120, 133).
		

Crossrefs

Cf. A357274 (triples), A357275 (smallest side), this sequence (middle side), A357277 (largest side), A357278 (perimeter).
Cf. also A088586, A229849, A229859.

Programs

  • Maple
    for c from 5 to 500 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
    				

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

Original entry on oeis.org

5, 8, 16, 24, 33, 35, 56, 45, 63, 51, 57, 77, 95, 120, 91, 115, 143, 112, 105, 175, 165, 195, 168, 145, 224, 261, 217, 192, 288, 247, 320, 272, 280, 315, 273, 259, 385, 304, 399, 407, 299, 287, 440, 437, 301, 387, 425, 533, 416, 368, 575, 520, 423, 459, 616, 517, 441, 400, 539, 616, 637, 600, 480, 520, 728, 735, 725
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 b if a * a + a * b + b * b == n * n
        }
      }
    end
    def A350347(n)
      ary = []
      i = 1
      while ary.size < n
        ary << A(i) if i.prime? && i % 6 == 1
        i += 1
      end
      ary
    end
    p A350347(100)

Formula

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