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!)
A308451 Number of integer-sided triangles with perimeter n whose largest side length is prime. 3
0, 0, 0, 0, 1, 1, 2, 1, 1, 0, 3, 2, 2, 1, 5, 3, 3, 2, 2, 1, 1, 0, 6, 5, 5, 4, 11, 9, 9, 7, 7, 5, 5, 3, 12, 10, 10, 8, 18, 15, 15, 13, 13, 11, 11, 9, 21, 18, 18, 15, 15, 12, 12, 10, 10, 8, 8, 6, 21, 19, 19, 17, 33, 30, 30, 27, 27, 24, 24, 21, 21, 19, 19, 17 (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(n-i-k), where c(n) is the prime characteristic (A010051).
MAPLE
f:= proc(n) local p, v;
v:= add(1/2*(3*p-n+1)+`if`((n-p)::even, 1/2, 0), p = select(isprime, [$ceil(n/3)..floor((n-1)/2)]));
end proc:
map(f, [$1..100]); # Robert Israel, May 28 2019
MATHEMATICA
Table[Sum[Sum[ (PrimePi[n - i - k] - PrimePi[n - i - k - 1]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
CROSSREFS
Sequence in context: A334204 A336362 A336363 * A308067 A124748 A161225
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 27 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 March 28 17:42 EDT 2024. Contains 371254 sequences. (Running on oeis4.)