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.

A318351 a(n) is the smallest prime p such that the sum of the first 2*n + 1 odd primes starting with p is prime.

This page as a plain text file.
%I A318351 #24 Nov 02 2018 06:02:21
%S A318351 3,5,5,17,3,5,29,3,3,11,7,7,5,7,13,13,7,5,5,13,7,7,7,7,11,17,3,3,97,
%T A318351 29,3,13,3,19,19,3,5,3,23,7,11,53,31,89,53,19,11,3,17,23,83,11,5,47,
%U A318351 37,5,17,3,3,29,23,5,5,5,59,7,7,31,3,67,3,3,89,71,31,41,29
%N A318351 a(n) is the smallest prime p such that the sum of the first 2*n + 1 odd primes starting with p is prime.
%C A318351 Conjecture: Sequence is bounded.
%C A318351 The sum of consecutive odd primes is the difference of two terms of A007504, which might be used to find terms for this sequence. - _David A. Corneth_, Aug 25 2018
%C A318351 Apart from the first term the same as A089793. - _R. J. Mathar_, Nov 02 2018
%H A318351 Robert Israel, <a href="/A318351/b318351.txt">Table of n, a(n) for n = 0..10000</a>
%e A318351 a(1) = 5 because 3 + 5 + 7 = 15 but 5 + 7 + 11 = 23.
%e A318351 From _David A. Corneth_, Sep 04 2018: (Start)
%e A318351 Partial sums of the primes is sequence A007504; 2, 5, 10, 17, 28, 41, 58, 77, 100, 129, 160, 197, ...
%e A318351 For n = 1, the least k such that A007504(k + 2*n + 1) - A007504(k) is prime is at k = 2 so a(1) is prime(k + 1) = prime(3) = 5.
%e A318351 (End)
%p A318351 N:= 100: # to get a(0)..a(N)
%p A318351 Primes:= [0,seq(ithprime(i),i=2..5/2*N)]:
%p A318351 PS:= ListTools:-PartialSums(Primes):
%p A318351 found:= true:
%p A318351 for n from 0 to 100 while found do
%p A318351   found:= false;
%p A318351   for k from 1 to 5/2*N - (2*n+1) do
%p A318351     if isprime(PS[k+2*n+1]-PS[k]) then
%p A318351       found:= true; A[n]:= Primes[k+1]; break
%p A318351     fi
%p A318351   od
%p A318351 od:
%p A318351 seq(A[n],n=0..N); # _Robert Israel_, Oct 21 2018
%t A318351 Array[Block[{k = 1}, While[! PrimeQ@ Total@ Prime[k + Range[2 # + 1]], k++]; Prime[k + 1]] &, 77, 0] (* _Michael De Vlieger_, Aug 25 2018 *)
%o A318351 (PARI) a(n) = {c = 2*n + 1; t=2; while(!isprime(sum(i = t, t + c - 1, prime(i))), t++); prime(t)} \\ _David A. Corneth_, Sep 04 2018
%o A318351 (PARI) upto(n) = {c = n<<1; c += (1-c%2); my(primeSums = List([3]), res = List([3])); t=0; forprime(p = 3, prime(c), t++; listput(primeSums, primeSums[t] + p)); forstep(i = 3, #primeSums, 2, for(j = 1, #primeSums - i,   if(isprime(primeSums[i + j] - primeSums[j]), listput(res,  primeSums[j+1] - primeSums[j]); next(2)))); res} \\ gives at most the first n terms \\ _David A. Corneth_, Sep 04 2018
%Y A318351 Cf. A000040, A007504, A065091, A071148.
%K A318351 nonn
%O A318351 0,1
%A A318351 _David James Sycamore_, Aug 24 2018