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.

A071195 Final prime in sequence of primes starting with prime(n) and having prime sum (see A071194), or -1 if no such sequence exists.

This page as a plain text file.
%I A071195 #17 Nov 17 2020 23:09:06
%S A071195 3,29,11,13,17,29,23,29,31,37,41,71,47,61,73,61,73,71,73,79,97,89,97,
%T A071195 113,127,107,137,131,127,139,149,173,157,151,157,173,167,173,227,223,
%U A071195 197,293,211,239,211,251,227,239,563,239,269,397,283,409,283,281,283
%N A071195 Final prime in sequence of primes starting with prime(n) and having prime sum (see A071194), or -1 if no such sequence exists.
%C A071195 The length of the sequence is given in A071194.
%H A071195 Charles R Greathouse IV, <a href="/A071195/b071195.txt">Table of n, a(n) for n = 1..10000</a>
%e A071195 n=2: p(2)=3, 3+7+11+13+17+19+23+29 = 127 is the shortest partial sum with initial prime 3; it ends with p(10) = 29 = a(2);
%e A071195 n=6: p(6)=13, 13+17+19+23+29 = 101, so the end-prime = a(6) = 29.
%t A071195 Prime@ Table[k = 1; While[! PrimeQ@ Total@ Prime@ Range[n, n + k], k++]; n + k, {n, 57}] (* _Michael De Vlieger_, Mar 25 2017 *)
%o A071195 (PARI) a(n,p=prime(n))=my(q=p); while(!isprime(p+=q=nextprime(q+1)),);q
%o A071195 apply(p->a(0,p), primes(30)) \\ _Charles R Greathouse IV_, Jun 16 2015
%Y A071195 Cf. A071194, A071196, A071197, A071198.
%K A071195 nonn
%O A071195 1,1
%A A071195 _Labos Elemer_, May 16 2002
%E A071195 Edited and escape clause added by _N. J. A. Sloane_, Nov 17 2020