login

A253415 revision #3


A253415
Smallest missing number within the first n terms in A095258.
4
2, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 22, 22, 22, 22, 22, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31
OFFSET
2,1
LINKS
PROG
(Haskell)
import Data.List (delete)
a253415 n = a253415_list !! (n-2)
a253415_list = f [2..] 1 where
f xs z = g xs where
g (y:ys) = if mod z' y > 0 then g ys else x : f xs' (z + y)
where xs'@(x:_) = delete y xs
z' = z + 2
-- Reinhard Zumkeller, Dec 31 2014
CROSSREFS
Cf. A095258, A095259, A253425 (run lengths).
Sequence in context: A278300 A034214 A317749 * A227401 A131813 A083038
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 31 2014
STATUS
editing