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.

A366398 a(n) is the number of distinct triangles with prime sides and whose perimeter is equal to the n-th prime.

This page as a plain text file.
%I A366398 #27 Oct 12 2023 01:51:57
%S A366398 0,0,0,1,1,1,2,1,1,3,2,3,5,4,5,4,5,3,5,4,3,6,7,10,11,10,8,12,8,11,11,
%T A366398 12,15,12,20,19,16,21,21,21,25,19,17,15,20,20,25,36,41,38,39,34,26,25,
%U A366398 30,34,31,27,34,45,36,33,42,39,33,45,47,54,55,48,50,58
%N A366398 a(n) is the number of distinct triangles with prime sides and whose perimeter is equal to the n-th prime.
%H A366398 Felix Huber, <a href="/A366398/b366398.txt">Table of n, a(n) for n = 1..1000</a>
%e A366398 For n = 13 the a(13) = 5 distinct triangles with prime sides (u, v, w) are (3, 19, 19), (5, 17, 19), (7, 17, 17), (11, 11, 19), and (11, 13, 17). They all have perimeter 41, which is the 13th prime.
%p A366398 A366398 := proc(n) local u, v, w, a; u := 1; a := 0; while 2*ithprime(u) < ithprime(n) do v := u; while 2*ithprime(v) <= ithprime(n) - ithprime(u) do if ithprime(n) < 2*ithprime(u) + 2*ithprime(v) and isprime(ithprime(n) - ithprime(u) - ithprime(v)) then a := a + 1; end if; v := v + 1; end do; u := u + 1; end do; return a; end proc; seq(A366398(n), n = 1 .. 100);
%Y A366398 Cf. A070088.
%K A366398 nonn
%O A366398 1,7
%A A366398 _Felix Huber_, Oct 09 2023