login
A078894
Start with a list of all the primes and repeatedly add the first element A of the list to the sequence and strike off every A-th element of the list.
1
2, 5, 11, 17, 23, 41, 47, 59, 67, 83, 97, 103, 137, 149, 157, 167, 191, 197, 211, 241, 257, 277, 307, 313, 331, 347, 379, 389, 401, 431, 449, 461, 487, 499, 523, 563, 571, 587, 599, 631, 643, 653, 677, 691, 709, 751, 761, 823, 853, 859, 883, 907, 937, 967
OFFSET
1,1
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
Cf. A000040.
Sequence in context: A135478 A019381 A113426 * A086319 A220813 A217303
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 11 2003
STATUS
approved