OFFSET
0,4
LINKS
Eric Weisstein's World of Mathematics, Ulam Sequence
Wikipedia, Ulam number
EXAMPLE
The first terms of A002858 are 1, 2, 3, 4, 6, 8, 11, 13, 16, 18, ...
a(10) = #{8+2, 6+4, 6+3+1, 4+3+2+1} = 4;
a(11) = #{11, 8+3, 8+2+1, 6+4+1, 6+3+2} = 5;
a(12) = #{11+1, 8+4, 8+3+1, 6+4+2, 6+3+2+1} = 5.
PROG
(Haskell)
a199017 = p a002858_list where
p _ 0 = 1
p (u:us) m | m < u = 0
| otherwise = p us (m - u) + p us m
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 03 2011
STATUS
approved