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.

This page as a plain text file.
%I A350347 #20 Dec 27 2021 08:23:44
%S A350347 5,8,16,24,33,35,56,45,63,51,57,77,95,120,91,115,143,112,105,175,165,
%T A350347 195,168,145,224,261,217,192,288,247,320,272,280,315,273,259,385,304,
%U A350347 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
%N A350347 Consider primitive 120-degree integer triangles with sides A < B < C = A002476(n). This sequence gives the values of B.
%H A350347 Seiichi Manyama, <a href="/A350347/b350347.txt">Table of n, a(n) for n = 1..1000</a>
%H A350347 Wikipedia, <a href="https://en.wikipedia.org/wiki/Integer_triangle">Integer triangle</a>
%F A350347 Let A = A349772(n). A^2 + A*B + B^2 = C^2.
%e A350347   n | ( A,  B,  C)
%e A350347 ----+-------------
%e A350347   1 | ( 3,  5,  7)
%e A350347   2 | ( 7,  8, 13)
%e A350347   3 | ( 5, 16, 19)
%e A350347   4 | (11, 24, 31)
%e A350347   5 | ( 7, 33, 37)
%e A350347   6 | (13, 35, 43)
%e A350347   7 | ( 9, 56, 61)
%e A350347   8 | (32, 45, 67)
%e A350347   9 | (17, 63, 73)
%o A350347 (Ruby)
%o A350347 require 'prime'
%o A350347 def A(n)
%o A350347   (1..n).each{|a|
%o A350347     (a + 1..n).each{|b|
%o A350347       return b if a * a + a * b + b * b == n * n
%o A350347     }
%o A350347   }
%o A350347 end
%o A350347 def A350347(n)
%o A350347   ary = []
%o A350347   i = 1
%o A350347   while ary.size < n
%o A350347     ary << A(i) if i.prime? && i % 6 == 1
%o A350347     i += 1
%o A350347   end
%o A350347   ary
%o A350347 end
%o A350347 p A350347(100)
%Y A350347 Cf. A002365, A002476 (C), A229849, A264827, A349772 (A).
%K A350347 nonn
%O A350347 1,1
%A A350347 _Seiichi Manyama_, Dec 26 2021