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!)
A334134 Number of integer-sided triangles with perimeter n whose side lengths can be written as the sum of two primes in the same number of ways. 0

%I #9 Jun 18 2020 14:06:14

%S 0,0,1,0,1,1,2,1,1,0,0,1,1,2,3,3,4,5,6,6,6,5,5,4,6,4,6,5,5,6,7,6,7,6,

%T 5,6,4,4,7,5,3,6,6,7,7,9,6,8,5,6,8,7,5,6,7,5,7,5,6,4,5,3,8,4,6,6,8,7,

%U 9,9,10,7,9,8,12,6,8,7,9,6,11,6,11,9,11,6,14

%N Number of integer-sided triangles with perimeter n whose side lengths can be written as the sum of two primes in the same number of ways.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Integer_triangle">Integer Triangle</a>

%F a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1)) * [c(i) = c(k) = c(n-i-k)], where [] is the Iverson bracket and c = A061358.

%e a(4) = 0; no triangles can be made.

%e a(7) = 2; The two triangles [1,3,3] and [2,2,3] both have perimeter 7, and in each case, the side lengths can be written as the sum of two primes in the same number of ways (0 ways).

%e a(12) = 1; The triangle [4,4,4] has perimeter 12 and all of its side lengths can be written as the sum of two primes in the same number of ways (1 way).

%e a(15) = 3; the triangles [4,4,7], [4,5,6] and [5,5,5] all have perimeter 15. In each triangle, all the side lengths can be written as the sum of two primes in the same number of ways (1 way).

%t Table[Sum[Sum[KroneckerDelta[Sum[(PrimePi[r] - PrimePi[r - 1]) (PrimePi[k - r] - PrimePi[k - r - 1]), {r, Floor[k/2]}], Sum[(PrimePi[s] - PrimePi[s - 1]) (PrimePi[i - s] - PrimePi[i - s - 1]), {s, Floor[i/2]}], Sum[(PrimePi[t] - PrimePi[t - 1]) (PrimePi[(n - i - k) - t] - PrimePi[(n - i - k) - t - 1]), {t, Floor[(n - i - k)/2]}]]*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]

%Y Cf. A005044, A061358.

%K nonn,easy

%O 1,7

%A _Wesley Ivan Hurt_, Apr 15 2020

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 August 28 11:18 EDT 2024. Contains 375496 sequences. (Running on oeis4.)