OFFSET
1,2
LINKS
Klaus Brockhaus, Table of n, a(n) for n=1..10000
D. X. Charles, Sieve Methods, July 2000, University of Wisconsin.
Rémi Eismann, Decomposition into weight * level + jump and application to a new classification of primes, arXiv:0711.0865 [math.NT]
M. C. Wunderlich, A general class of sieve generated sequences, Acta Arithmetica XVI,1969, pp.41-56.
EXAMPLE
First few steps are:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 1, a(1) = 1; delete terms at positions 2 to 2; this is 2;
1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 2,a(2) = 3; delete terms at positions 5 to 7; these are 6,7,8;
1,3,4,5,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 3, a(3) = 4; delete terms at positions 7 to 10; these are 11,12,13,14;
1,3,4,5,9,10,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
n = 4, a(4) = 5; delete terms at positions 9 to 13; these are 17,18,19,20,21;
1,3,4,5,9,10,15,16,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36...
n = 5 a(5) = 9; delete terms at positions 14 to 22; these are 27,28,29,30,31,32,33,34,35;
1,3,4,5,9,10,15,16,22,23,24,25,26,36,...
MATHEMATICA
f[seq_] := Module[{s = seq, n1, n2}, n++; n1 = s[[n]] + n; If[n1 <= len, n2 = Min[n - 1 + 2*s[[n]], len]; len -= n2 - n1 + 1; Drop[s, {n1, n2}], s]]; n = 0; len = 1000; FixedPoint[f, Range[len]] (* Jean-François Alcover, Sep 29 2011 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Mar 16 2008
EXTENSIONS
Edited and extended by Klaus Brockhaus, Apr 20 2008
STATUS
approved