%N Each prime p is followed by p nonprimes.
%C The sequence starts with a(1) = 2 and was always extended with the smallest integer not yet present that does not lead to a contradiction.
%H Jean-Marc Falcoz, <a href="/A277376/b277376.txt">Table of n, a(n) for n = 1..7162</a>
%e As a(1) = 2, we take for a(2) and a(3) the nonprimes "1" and "4"; we then extend the sequence with a(4) which must be the smallest prime not yet present: this is "3"; we take for a(5), a(6) and a(7) the 3 smallest nonprimes not yet present: they are 6, 8 and 9; we then extend the sequence with the smallest prime available, which is a(8) = 5. Etc.
%p p:= 0: q:= 0: res:= NULL:
%p for i from 1 to 20 do
%p p:= nextprime(p);
%p res:= res, p;
%p count:= 0;
%p while count < p do
%p q:= q+1;
%p if not isprime(q) then
%p res:= res, q;
%p count:= count+1;
%p res; # _Robert Israel_, Oct 19 2016
%A _Eric Angelini_ and _Jean-Marc Falcoz_, Oct 11 2016