[seqfan] Re: https://oeis.org/A254211 Finite?
M. F. Hasler
seqfan at hasler.fr
Thu Jan 29 06:27:02 CET 2015
> Am 27.01.2015 um 12:26 schrieb Ron Hardin:
>> Right, the every partial sum from either end is never prime.
This inspired me https://oeis.org/draft/A254337
Lexicographic first sequence such that a(k)+...+a(n) is never prime
and all terms are different.
0, 1, 8, 6, 10, 14, 12, 4, 20, 16, 24, 18, 22, 28, 26, 34, 30, 32, 36,
40, 42, ...
The sequence may not contain any prime. Does it contain all even
numbers > 2? (It seems so.) Does it contain any odd number beyond 1?
(It seems not.)
(PARI)
{a=[m=L=u=0];for(i=1,99, print1(a[i]","); u+=2^a[i];
m==a[i] && while(isprime(m++)||bittest(u,m),); a=concat(a,m);
until( 0, s=a[k=i+1]; while( k>1 && ! isprime( s+=a[k--]),);
isprime(s) || break;while( isprime(a[i+1]++) || bittest(u,a[i+1]),);))}
--
Maximilian
More information about the SeqFan
mailing list