OFFSET
0,3
COMMENTS
a(n) <= A000217(n).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (maybe)
a247799 n = a247799_list !! n
a247799_list = 0 : f 1 [0] where
f x zs@(z:_) = y : f (x + 1) (y : zs) where
y = z + maybe x id (elemIndex x $ reverse zs)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 26 2014
STATUS
approved