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.

A254341 Lexicographically earliest sequence of distinct numbers with alternating parity such that no sum of consecutive terms is prime.

This page as a plain text file.
%I A254341 #20 Jan 29 2015 21:32:24
%S A254341 0,1,8,25,24,27,6,9,30,15,42,39,18,21,36,33,60,35,16,69,48,63,12,51,
%T A254341 66,45,72,87,54,93,78,81,90,57,84,75,114,111,96,99,120,105,102,117,
%U A254341 144,123,108,129,126,135,138,147,150,141,162,153,156,159,132,171,174,165,168,177,192,183,180,189,186,195,198,207,204,201,216,213,228,219,210,231,222,249,240,237,252,243,258,255,234,261,246,225,288,267,264,273,276,279,270
%N A254341 Lexicographically earliest sequence of distinct numbers with alternating parity such that no sum of consecutive terms is prime.
%C A254341 In other words, no sum a(i)+a(i+1)+a(i+2)+...+a(j) may be prime. In particular, the sequence may not contain any primes.
%C A254341 Without the condition that the parity alternates, it seems that the sequence (A254337) contains only a single odd number.
%C A254341 It appears that a(n) ~ 3n. Is there a simple explanation for this?
%H A254341 M. F. Hasler, <a href="/A254341/b254341.txt">Table of n, a(n) for n = 0..9999</a>
%o A254341 (PARI) {N=10^3; a=[]; u=0; for(i=0,N, a=concat(a,i%2); until( ! isprime(s) || ! a[#a]+=2, while( isprime(a[#a]) || bittest(u,a[#a]), a[#a]+=2);  s=a[k=#a]; while( k>1 && ! isprime( s+=a[k--]),)); u+=2^a[#a])}
%Y A254341 Cf. A254337, A153136.
%K A254341 nonn
%O A254341 0,3
%A A254341 _M. F. Hasler_, Jan 29 2015