Seq: Natural numbers that cannot be written as a sum of one or more consecutive composites
Robert Israel
israel at math.ubc.ca
Tue Jun 24 06:03:29 CEST 2008
On Mon, 23 Jun 2008, Jonathan Post wrote:
> 1, 2, 3, 5, 7, 11, 13, 47, 61, 73, [no more through 101]
>
> Natural numbers that cannot be written as a sum of one or more
> consecutive composites (A002808).
>
> These must be nonprimes.
Of course you mean noncomposites (i.e. 1 or prime).
The members of the sequence up to 5000 are
2, 3, 5, 7, 11, 13, 47, 61, 73, 107, 167, 179, 313, 347, 421, 479,
719, 863, 1153, 1213, 1283, 1307, 1523, 3467, 3733, 4007, 4621, 4787
if the following Maple program is to be believed.
N:= 5000:
primes,comps:= selectremove(isprime,{$2..N}):
M:= nops(comps):
X:= primes:
for n from 1 to floor(sqrt(2*N)) do
i:= 1;
T:= add(comps[k],k=1..n);
while T <= N do
X := X minus {T};
if i + n > M then break fi;
T := T + comps[i+n] - comps[i];
i := i+1;
od;
od:
X;
Cheers,
Robert
At 9:06 PM -0700 6/23/08, Robert Israel wrote:
>On Mon, 23 Jun 2008, Jonathan Post wrote:
>
>> 1, 2, 3, 5, 7, 11, 13, 47, 61, 73, [no more through 101]
>>
>> Natural numbers that cannot be written as a sum of one or more
>> consecutive composites (A002808).
>>
>> These must be nonprimes.
>
>Of course you mean noncomposites (i.e. 1 or prime).
>
>The members of the sequence up to 5000 are
>
>2, 3, 5, 7, 11, 13, 47, 61, 73, 107, 167, 179, 313, 347, 421, 479,
>719, 863, 1153, 1213, 1283, 1307, 1523, 3467, 3733, 4007, 4621, 4787
Correction. A037174 does not use 1. With 1 and the composites, the
Looks like A037174 (Primes which are not the sum of consecutive composite
numbers).
Tony
At 9:06 PM -0700 6/23/08, Robert Israel wrote:
>On Mon, 23 Jun 2008, Jonathan Post wrote:
>
>> 1, 2, 3, 5, 7, 11, 13, 47, 61, 73, [no more through 101]
>>
>> Natural numbers that cannot be written as a sum of one or more
>> consecutive composites (A002808).
>>
>> These must be nonprimes.
>
>Of course you mean noncomposites (i.e. 1 or prime).
>
>The members of the sequence up to 5000 are
>
>2, 3, 5, 7, 11, 13, 47, 61, 73, 107, 167, 179, 313, 347, 421, 479,
>719, 863, 1153, 1213, 1283, 1307, 1523, 3467, 3733, 4007, 4621, 4787
Looks like A037174 (where 1 is taken as composite).
Tony
More information about the SeqFan
mailing list