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 A306677 #11 May 03 2019 19:24:15 %S A306677 0,1,1,1,2,3,4,7,8,10,11,13,16,19,23,28,30,33,37,44,45,52,59,65,67,75, %T A306677 78,88,93,103,107,117,123,129,139,141,153,161,174,182,192,194,212,217, %U A306677 234,240,254,265,279,283,297,316,317,343,356,368,380,382,404 %N A306677 Number of distinct obtuse triangles with prime sides and largest side = prime(n). %e A306677 For n=5, prime(n)=11. Triangles: {5, 7, 11}, {7, 7, 11}, so a(5) = 2. %e A306677 For n=6, prime(n)=13. Triangles: {3, 11, 13}, {5, 11, 13}, {7, 7, 13}, so a(6)=3. %p A306677 #nType=1 for acute triangles, nType=2 for obtuse triangles %p A306677 #nType=0 for both triangles %p A306677 CountPrimeTriangles := proc (n, nType := 1) %p A306677 local aa, oo, j, k, sg, a, b, c, tt, lAcute; %p A306677 aa := {}; oo := {}; %p A306677 a := ithprime(n); %p A306677 for j from n by -1 to 1 do %p A306677 b := ithprime(j); %p A306677 for k from j by -1 to 1 do %p A306677 c := ithprime(k); %p A306677 if a < b+c and abs(b-c) < a and b < c+a and abs(c-a) < b and c < a+b and abs(a-b) < c then %p A306677 lAcute := evalb(0 < b^2+c^2-a^2); %p A306677 tt := sort([a, b, c]); %p A306677 if lAcute then aa := {op(aa), tt} else oo := {op(oo), tt} end if %p A306677 end if %p A306677 end do %p A306677 end do; %p A306677 return sort(`if`(nType = 1, aa, `if`(nType = 2, oo, `union`(aa, oo)))) %p A306677 end proc: %Y A306677 Cf. A306673, A306674, A306676, A306678. %K A306677 nonn %O A306677 1,5 %A A306677 _César Eliud Lozada_, Mar 04 2019