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.

Showing 1-2 of 2 results.

A099655 a[n]=A098085[n]-A096215[n], difference between next and previous primes to A011974[n], the sum of two consecutive primes.

Original entry on oeis.org

4, 4, 2, 2, 6, 2, 6, 2, 6, 2, 4, 6, 6, 8, 4, 4, 14, 4, 2, 10, 6, 6, 6, 10, 2, 12, 12, 12, 12, 2, 6, 6, 6, 10, 14, 4, 14, 14, 10, 4, 8, 6, 6, 8, 8, 10, 6, 8, 8, 2, 12, 8, 8, 6, 12, 18, 18, 10, 6, 6, 6, 2, 2, 12, 12, 6, 12, 8, 10, 8, 10, 8, 4, 6, 8, 4, 14, 12, 2, 2, 14, 14, 14, 14, 2, 20, 20, 8, 10, 8
Offset: 1

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=8, p(8)+p(9)=19+23=42,a[8]=43-41=2=a(8).
		

Crossrefs

Programs

  • Mathematica
    <Harvey P. Dale, Mar 07 2017 *)

Formula

a(n)=NextPrime[p(n)+p(n+1)]-PreviousPrime[p(n)+p(n+1)]

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 *)
Showing 1-2 of 2 results.