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.

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

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