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-1 of 1 results.

A381062 a(n) is the first prime p such that the sum of any 2*n-1 of the 2*n consecutive primes starting with p is prime.

Original entry on oeis.org

2, 19, 9733, 69398759
Offset: 1

Views

Author

Robert Israel, Feb 12 2025

Keywords

Examples

			a(2) = 19 because the sum of any 3 of the 4 primes 19, 23, 29, 31 is prime:
  19 + 23 + 29 = 71
  19 + 23 + 31 = 73
  19 + 29 + 31 = 79
  23 + 29 + 31 = 83 are all prime, and 19 is the first prime that works.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local P,S,p,i;
      P:= [0,seq(ithprime(i),i=1..2*n-1)]:
      S:= convert(P,`+`);
      do
        p:= nextprime(P[-1]);
        S:= S + p - P[1];
        P:= [op(P[2..-1]),p];
        if andmap(t -> isprime(S-t),P) then return P[1] fi
      od
    end proc:
    map(f, [$1..4]);
Showing 1-1 of 1 results.