%I #50 Mar 17 2021 15:38:40
%S 5,41,953,9521,92951,997651,9964597,99819619,999715711,9999419621,
%T 99987684473,999973156643,9999946325147,99999863884699,
%U 999999149973119,9999994503821977,99999999469565483,999999988375776737,9999999776402081701
%N Let S(n,k) denote the set of primes < 10^n which are the sum of k consecutive primes, and let K = maximum k >= 2 such that S(n,k) is nonempty; then a(n) = max S(n,K).
%C Inspired by the 50th problem of Project Euler (see link).
%C There must be at least two consecutive primes in the sum.
%C The corresponding number K of consecutive primes to get this largest prime is A342440(n) and the first prime of these A342440(n) consecutive primes is A342453(n).
%C It can happen that the sums of K = A342440(n) consecutive primes give two (or more) distinct n-digit primes. In that case, a(n) is the greatest of these primes. _Martin Ehrenstein_ proved that there are only two such cases when 1 <= n <= 19, for n = 7 and n = 15 (see corresponding examples).
%C Solutions and Python program are proposed in Dreamshire and Archive.today links. - _Daniel Suteu_, Mar 12 2021
%H Dreamshire, <a href="https://blog.dreamshire.com/project-euler-50-solution/">Project Euler 50 Solution</a>.
%H Archive.today, <a href="https://archive.is/WNBa2">trizen / experimental-projects</a>.
%H Project Euler, <a href="https://projecteuler.net/problem=50">Problem 50: Consecutive prime sum</a>.
%e a(1) = 5 = 2+3.
%e a(2) = 41 = 2 + 3 + 5 + 7 + 11 + 13; note that 97 = 29 + 31 + 37 is prime, sum of 3 consecutive primes, but 41 is obtained by adding 6 consecutive primes, so, 97 is not a term.
%e A342440(7) = 1587, and there exist two 7-digit primes that are sum of 1587 consecutive primes; as 9951191 = 5+...+13399 < 9964597 = 7+...+13411 hence a(7) = 9964597.
%e A342440(15) = 10695879 , and there exist two 15-digit primes that are sum of 10695879 consecutive primes; as 999998764608469 = 7+...+192682309 < 999999149973119 = 13+...+192682337, hence a(15) = 999999149973119.
%Y Cf. A034962, A034965, A082246, A082251, A127340, A127341, A215991, A067377.
%Y Cf. A342440, A342443, A342444, A342453, A342454.
%K nonn,base,more
%O 1,1
%A _Bernard Schott_, Mar 12 2021
%E Name improved by _N. J. A. Sloane_, Mar 12 2021
%E a(4)-a(17) from _Daniel Suteu_, Mar 12 2021
%E a(18)-a(19) from _Martin Ehrenstein_, Mar 13 2021
%E a(7) and a(15) corrected by _Martin Ehrenstein_, Mar 15 2021