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.

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

This page as a plain text file.
%I A229849 #10 Oct 06 2013 15:29:00
%S A229849 5,8,16,24,33,35,39,45,51,56,57,63,77,80,85,88,91,95,105,112,115,120,
%T A229849 143,145,155,160,161,165,168,175,187,192,195,203,208,209,217,221,224,
%U A229849 231,247,253,259,261,272,273,279,280,287,288,299,301,304,315,320,323
%N A229849 Consider all primitive 120-degree triangles with sides A < B < C. The sequence gives the values of B.
%C A229849 A primitive triangle is one for which the sides have no common factor.
%C A229849 For n>1, A106505(n) seems to give the values of A and A004611(n) seems to give the values of C.
%H A229849 Wikipedia, <a href="https://en.wikipedia.org/wiki/Integer_triangle">Integer triangle</a>
%e A229849 33 appears in the sequence because there exists a primitive 120-degree triangle with sides 7, 33 and 37.
%o A229849 (PARI)
%o A229849 \\ Gives values of B not exceeding bmax
%o A229849 \\ e.g. pt120b(80) gives [5, 8, 16, 24, 33, 35, 39, 45, 51, 56, 57, 63, 77, 80]
%o A229849 pt120b(bmax) = {
%o A229849   s=[];
%o A229849   for(m=1, (bmax-1)\2,
%o A229849     for(n=1, m-1,
%o A229849       if((m-n)%3!=0 && gcd(m, n)==1,
%o A229849         a=m*m-n*n;
%o A229849         b=n*(2*m+n);
%o A229849         if(a>b, b=a);
%o A229849         if(b<=bmax, s=concat(s, b))
%o A229849       )
%o A229849     )
%o A229849   );
%o A229849   vecsort(s,,8)
%o A229849 }
%Y A229849 Cf. A004611, A106505, A229858, A229859.
%K A229849 nonn
%O A229849 1,1
%A A229849 _Colin Barker_, Oct 06 2013