OFFSET
0,1
COMMENTS
Conjecture: Sequence is bounded.
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
Apart from the first term the same as A089793. - R. J. Mathar, Nov 02 2018
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
a(1) = 5 because 3 + 5 + 7 = 15 but 5 + 7 + 11 = 23.
From David A. Corneth, Sep 04 2018: (Start)
Partial sums of the primes is sequence A007504; 2, 5, 10, 17, 28, 41, 58, 77, 100, 129, 160, 197, ...
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.
(End)
MAPLE
N:= 100: # to get a(0)..a(N)
Primes:= [0, seq(ithprime(i), i=2..5/2*N)]:
PS:= ListTools:-PartialSums(Primes):
found:= true:
for n from 0 to 100 while found do
found:= false;
for k from 1 to 5/2*N - (2*n+1) do
if isprime(PS[k+2*n+1]-PS[k]) then
found:= true; A[n]:= Primes[k+1]; break
fi
od
od:
seq(A[n], n=0..N); # Robert Israel, Oct 21 2018
MATHEMATICA
Array[Block[{k = 1}, While[! PrimeQ@ Total@ Prime[k + Range[2 # + 1]], k++]; Prime[k + 1]] &, 77, 0] (* Michael De Vlieger, Aug 25 2018 *)
PROG
(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
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Aug 24 2018
STATUS
approved