login
A003311
Write down the numbers from 3 to infinity. Take next number, M say, that has not been crossed off. Counting through the numbers that have not yet been crossed off after that M, cross off the first, (M+1)st, (2M+1)st, (3M+1)st, etc. Repeat. The numbers that are left form the sequence.
(Formerly M2436)
5
3, 5, 8, 11, 15, 18, 23, 27, 32, 38, 42, 47, 53, 57, 63, 71, 75, 78, 90, 93, 98, 105, 113, 117, 123, 132, 137, 140, 147, 161, 165, 168, 176, 183, 188, 197, 206, 212, 215, 227, 233, 237, 243, 252, 258, 267, 278, 282, 287, 293, 303, 312, 317, 323
OFFSET
1,1
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Popular Computing (Calabasas, CA), Sieves: Problem 43, Vol. 2 (No. 13, Apr 1974), pp. 6-7. Based on a misreading of Sieve #3. A100464 is the correct version. [Annotated and scanned copy]
EXAMPLE
The first few sieving stages are as follows:
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
3 X 5 6 X 8 9 XX 11 12 XX 14 15 XX 17 18 XX 20 ...
3 X 5 X X 8 9 XX 11 12 XX XX 15 XX 17 18 XX 20 ...
3 X 5 X X 8 X XX 11 12 XX XX 15 XX 17 18 XX 20 ...
3 X 5 X X 8 X XX 11 XX XX XX 15 XX 17 18 XX 20 ...
3 X 5 X X 8 X XX 11 XX XX XX 15 XX XX 18 XX 20 ...
PROG
(Haskell)
a003311 n = a003311_list !! (n-1)
a003311_list = f [3..] where
f (x:xs) = x : f (g xs) where
g zs = us ++ g vs where (_:us, vs) = splitAt x zs
-- Reinhard Zumkeller, Nov 12 2014
KEYWORD
nonn
EXTENSIONS
Entry revised Nov 29 2004
STATUS
approved