OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
Start off with a list of the primes: 2,3,5,7,11,13,17,19,23,....;
include 2 in the sequence and strike off every second element of the list and what remains is 5,11,17,23,31,41,....;
include 5 in the sequence and strike off every fifth element of the list and what remains is 11,17,23,41,....:
keep repeating this procedure.
PROG
(Haskell)
a078894 n = a078894_list !! (n-1)
a078894_list = sieve a000040_list where
sieve (p:ps) = p : sieve [q | (i, q) <- zip [2..] ps, mod i p > 0]
-- Reinhard Zumkeller, Dec 08 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 11 2003
STATUS
approved