login
Primes that are not the sum of at least two consecutive primes.
3

%I #14 Sep 26 2023 09:06:27

%S 2,3,7,11,13,19,29,37,43,47,61,73,79,89,103,107,113,137,149,151,157,

%T 163,167,179,191,193,227,229,239,241,257,277,283,293,307,313,317,337,

%U 347,359,367,383,389,397,409,419,433,461,467,509,521,541,547,557,569

%N Primes that are not the sum of at least two consecutive primes.

%C Complement of A067377 in the primes. For the primes less than 10^6, these primes make up about 56%.

%H Robert Israel, <a href="/A197227/b197227.txt">Table of n, a(n) for n = 1..5000</a>

%F Prime(n) such that A307610(n) = 1. - Ray Chandler, Sep 21 2023

%p P:= [seq(ithprime(i),i=1..10^3)]:

%p S:= ListTools:-PartialSums([0,op(P)]):

%p sort(convert(convert(P,set) minus {seq(seq(S[i]-S[j],j=1..i-2),i=1..10^3+1)},list)); # _Robert Israel_, May 09 2021

%t lim = 1000; pFound = {}; ps = Prime[Range[PrimePi[lim]]]; sm = ps; i = 0; While[i++; j = 1; While[sm[[j]] = sm[[j]] + ps[[i + j]]; sm[[j]] <= lim, If[PrimeQ[sm[[j]]], AppendTo[pFound, sm[[j]]]]; j++]; j > 1]; Complement[ps, pFound]

%Y Cf. A050940, A067377, A307610.

%K nonn

%O 1,1

%A _T. D. Noe_, Nov 03 2011

%E Definition clarified by _Jonathan Sondow_, May 18 2013