A254341 Lexicographically earliest sequence of distinct numbers with alternating parity such that no sum of consecutive terms is prime.
0, 1, 8, 25, 24, 27, 6, 9, 30, 15, 42, 39, 18, 21, 36, 33, 60, 35, 16, 69, 48, 63, 12, 51, 66, 45, 72, 87, 54, 93, 78, 81, 90, 57, 84, 75, 114, 111, 96, 99, 120, 105, 102, 117, 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
Offset: 0
Keywords
Links
- M. F. Hasler, Table of n, a(n) for n = 0..9999
Programs
-
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])}
Comments