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.

A346416 Primes p such that the greatest perimeter of a triangle with prime sides including p and the next prime is prime.

Original entry on oeis.org

5, 11, 13, 17, 19, 37, 41, 43, 47, 59, 71, 89, 103, 109, 113, 137, 139, 149, 163, 167, 173, 179, 181, 241, 269, 313, 337, 379, 389, 401, 491, 499, 521, 547, 557, 569, 587, 599, 607, 613, 617, 631, 643, 673, 677, 701, 739, 773, 787, 811, 839, 877, 883, 887, 929, 941, 953, 971, 977, 983, 1019, 1021
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 15 2021

Keywords

Comments

If p is prime and q is the next prime, the greatest perimeter is p+q+r where r is the greatest prime < p+q.

Examples

			a(3) = 13 is a term because the next prime is 17, the greatest prime < 13+17 is 29, and 13+17+29 = 59 is prime.
		

Crossrefs

Cf. A096215.

Programs

  • Maple
    f:= proc(n) local p,q,r,s;
      p:= ithprime(n);
      q:= ithprime(n+1);
      r:= prevprime(p+q);
      s:= p+q+r;
      if isprime(p+q+r) then return p fi
    end proc:
    map(f, [$1..500]);
  • Mathematica
    Select[Partition[Prime[Range[200]],2,1],PrimeQ[Total[#]+NextPrime[Total[#],-1]]&][[;;,1]] (* Harvey P. Dale, Dec 11 2024 *)