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.

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

Views

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.