cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			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 ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • 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

Extensions

Entry revised Nov 29 2004