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.

This page as a plain text file.
%I A349772 #62 Dec 27 2021 08:23:47
%S A349772 3,7,5,11,7,13,9,32,17,40,55,40,24,13,69,56,25,75,104,32,56,29,85,119,
%T A349772 31,19,95,133,35,105,21,105,111,88,152,176,23,161,41,48,205,240,43,88,
%U A349772 275,208,184,27,235,297,49,147,280,245,29,203,319,377,240,159,155,217,371,341,55,64,112
%N A349772 Consider primitive 120-degree integer triangles with sides A < B < C = A002476(n). This sequence gives the values of A.
%H A349772 Seiichi Manyama, <a href="/A349772/b349772.txt">Table of n, a(n) for n = 1..1000</a>
%H A349772 Wikipedia, <a href="https://en.wikipedia.org/wiki/Integer_triangle">Integer triangle</a>
%F A349772 Let B = A350347(n). A^2 + A*B + B^2 = C^2.
%e A349772   n | ( A,  B,  C)
%e A349772 ----+-------------
%e A349772   1 | ( 3,  5,  7)
%e A349772   2 | ( 7,  8, 13)
%e A349772   3 | ( 5, 16, 19)
%e A349772   4 | (11, 24, 31)
%e A349772   5 | ( 7, 33, 37)
%e A349772   6 | (13, 35, 43)
%e A349772   7 | ( 9, 56, 61)
%e A349772   8 | (32, 45, 67)
%e A349772   9 | (17, 63, 73)
%o A349772 (Ruby)
%o A349772 require 'prime'
%o A349772 def A(n)
%o A349772   (1..n).each{|a|
%o A349772     (a + 1..n).each{|b|
%o A349772       return a if a * a + a * b + b * b == n * n
%o A349772     }
%o A349772   }
%o A349772 end
%o A349772 def A349772(n)
%o A349772   ary = []
%o A349772   i = 1
%o A349772   while ary.size < n
%o A349772     ary << A(i) if i.prime? && i % 6 == 1
%o A349772     i += 1
%o A349772   end
%o A349772   ary
%o A349772 end
%o A349772 p A349772(100)
%Y A349772 Cf. A002366, A002476 (C), A229858, A264827, A350347 (B).
%K A349772 nonn
%O A349772 1,1
%A A349772 _Seiichi Manyama_, Dec 26 2021