login
A209259
The lexicographically earliest sequence of nonnegative integers such that a(2n-1) = prime(n), n>0, and any two neighbors sum to a prime.
2
1, 2, 0, 3, 8, 5, 6, 7, 12, 11, 18, 13, 24, 17, 42, 19, 48, 23, 14, 29, 30, 31, 10, 37, 60, 41, 66, 43, 36, 47, 20, 53, 44, 59, 78, 61, 22, 67, 96, 71, 108, 73, 28, 79, 84, 83, 68, 89, 102, 97, 126, 101, 90, 103, 120, 107, 72, 109, 54, 113, 114, 127, 150, 131, 26, 137, 132, 139, 144, 149, 162, 151, 16, 157, 34, 163, 186, 167, 56, 173, 50
OFFSET
0,2
COMMENTS
The even places a(0),a(2),... are to be filled with nonprime numbers. The term a(2) between a(1)=2 and a(3)=3 can only be zero, therefore the smallest possible sequence starts (1,2,0,3,...). The number 1 cannot appear elsewhere than in the initial position 0. The sequence cannot be a permutation of the integers, since the number 4 cannot appear anywhere: if prime(n)+4 is prime (n>2), then this is necessarily prime(n+1) and congruent to 5 modulo 6, so prime(n+1)+4 cannot be prime. There is also no odd composite number in the sequence.
LINKS
E. Angelini, Primes and prime sums, SeqFan mailing list, Jan 14 2013
Jean-Marc Falcoz, Primes and prime sums
J.-M. Falcoz, Primes and prime sums [Cached copy, with permission]
PROG
(PARI) {print1("1, "q=2); u=2 /*bitmap of used even numbers*/; forprime(p=3, default(primelimit), forstep(i=0, 9e9, 2, !bittest(u, i\2) & isprime(q+i) & isprime(p+i) & (1+q=i) & break); u+=1<<(q\2); print1(", "q", "p); q=p)}
CROSSREFS
Cf. A222307.
Sequence in context: A131330 A022833 A257236 * A020826 A094346 A074104
KEYWORD
nonn,nice
AUTHOR
Eric Angelini and M. F. Hasler, Jan 14 2013
STATUS
approved