login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306676 Number of distinct acute triangles with prime sides and largest side = prime(n). 4
1, 2, 3, 5, 5, 8, 9, 11, 13, 12, 18, 17, 21, 27, 30, 28, 30, 38, 38, 43, 56, 53, 59, 59, 56, 64, 79, 85, 100, 106, 79, 90, 96, 115, 102, 123, 124, 130, 144, 147, 152, 177, 161, 188, 199, 225, 193, 175, 195, 228, 248, 247, 280, 259, 267, 277, 288, 324 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
For n=3, prime(n)=5. Acute triangles: {2,5,5}, {3,5,5}, {5,5,5} (Total=3=a(3)).
For n=4, prime(n)=7. Acute triangles: {2,7,7}, {3,7,7}, {5,5,7}, {5, 7, 7}, {7, 7, 7} (Total=5=a(4)).
MAPLE
#nType=1 for acute triangles, nType=2 for obtuse triangles
#nType=0 for both triangles
CountPrimeTriangles := proc (n, nType := 1)
local aa, oo, j, k, sg, a, b, c, tt, lAcute;
aa := {}; oo := {};
a := ithprime(n);
for j from n by -1 to 1 do
b := ithprime(j);
for k from j by -1 to 1 do
c := ithprime(k);
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
lAcute := evalb(0 < b^2+c^2-a^2);
tt := sort([a, b, c]);
if lAcute then aa := {op(aa), tt} else oo := {op(oo), tt} end if
end if
end do
end do;
return sort(`if`(nType = 1, aa, `if`(nType = 2, oo, `union`(aa, oo))))
end proc:
CROSSREFS
Sequence in context: A184165 A152771 A325711 * A363058 A341122 A237825
KEYWORD
nonn
AUTHOR
César Eliud Lozada, Mar 04 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 18:12 EDT 2024. Contains 374585 sequences. (Running on oeis4.)