login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A335623
Perimeters of integer-sided triangles such that the average of each pair of side lengths is prime.
1
6, 7, 9, 11, 15, 17, 19, 21, 25, 27, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141
OFFSET
1,1
COMMENTS
Since the average of any two prime side lengths of an isosceles triangle is itself a prime, p, the perimeters 3p are in the sequence for all primes p.
MATHEMATICA
Table[If[Sum[Sum[(1 - Ceiling[(i + k)/2] + Floor[(i + k)/2]) (1 - Ceiling[(n - i)/2] + Floor[(n - i)/2]) (1 - Ceiling[(n - k)/2] + Floor[(n - k)/2]) (PrimePi[(i + k)/2] - PrimePi[(i + k)/2 - 1])*(PrimePi[(n - i)/2] - PrimePi[(n - i)/2 - 1])*(PrimePi[(n - k)/2] - PrimePi[(n - k)/2 - 1]) * Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}] > 0, n, {}], {n, 150}] // Flatten
CROSSREFS
Cf. A005044 (Alcuin's sequence), A335622.
Sequence in context: A081053 A022892 A120164 * A074898 A258153 A175221
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 02 2020
STATUS
approved