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
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, 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, 9, 9, 10, 7, 9, 8, 12, 6, 8, 7, 9, 6, 11, 6, 11, 9, 11, 6, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
Wikipedia, Integer Triangle
FORMULA
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.
EXAMPLE
a(4) = 0; no triangles can be made.
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).
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).
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).
MATHEMATICA
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}]
CROSSREFS
Sequence in context: A368751 A025908 A134404 * A249609 A232442 A107110
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 15 2020
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 April 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)