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.
%I A229858 #19 Jun 30 2023 22:42:42 %S A229858 3,5,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, %T A229858 29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51, %U A229858 52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70 %N A229858 Consider all 120-degree triangles with sides A < B < C. The sequence gives the values of A. %C A229858 A229859 gives the values of B, and A050931 gives the values of C. %C A229858 This sequence contains every integer larger than 8. - _Nathaniel Johnston_, Oct 06 2013 %H A229858 Wikipedia, <a href="https://en.wikipedia.org/wiki/Integer_triangle">Integer triangle</a> %H A229858 Kival Ngaokrajang, <a href="/A229858/a229858.pdf">Illustration of initial terms</a> %H A229858 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2, -1). %F A229858 a(n) = n+4 for n>4. %F A229858 a(n) = 2*a(n-1)-a(n-2) for n>6. %F A229858 G.f.: -x*(x^5-x^4+x^2+x-3) / (x-1)^2. %e A229858 12 appears in the sequence because there exists a 120-degree triangle with sides 12, 20 and 28. %o A229858 (PARI) %o A229858 \\ Gives values of A not exceeding amax. %o A229858 \\ e.g. t120a(20) gives [3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] %o A229858 t120a(amax) = { %o A229858 v=pt120a(amax); %o A229858 s=[]; %o A229858 for(i=1, #v, %o A229858 for(m=1, amax\v[i], %o A229858 if(v[i]*m<=amax, s=concat(s, v[i]*m)) %o A229858 ) %o A229858 ); %o A229858 vecsort(s,,8) %o A229858 } %o A229858 \\ Gives values of A not exceeding amax in primitive triangles. %o A229858 \\ e.g. pt120a(20) gives [3, 5, 7, 9, 11, 13, 15, 16, 17, 19] %o A229858 pt120a(amax) = { %o A229858 s=[]; %o A229858 for(m=1, (amax-1)\2, %o A229858 for(n=1, m-1, %o A229858 if((m-n)%3!=0 && gcd(m, n)==1, %o A229858 a=m*m-n*n; %o A229858 b=n*(2*m+n); %o A229858 if(a>b, a=b); %o A229858 if(a<=amax, s=concat(s, a)) %o A229858 ) %o A229858 ) %o A229858 ); %o A229858 vecsort(s,,8) %o A229858 } %Y A229858 Cf. A050931, A229849, A229859. %K A229858 nonn,easy %O A229858 1,1 %A A229858 _Colin Barker_, Oct 06 2013