OFFSET
0,3
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(6) = #{6, 4+2, 4+1+1, 3+3, 3+2+1, 3+1+1+1, 2+2+2, 2+2+1+1, 2+1+1+1+1, 1+1+1+1+1+1} = 10;
a(7) = #{6+1, 4+3, 4+2+1, 4+1+1+1, 3+3+1, 3+2+2, 3+2+1+1, 3+1+1+1+1, 2+2+2+1, 2+2+1+1+1, 2+1+1+1+1+1, 1+1+1+1+1+1+1} = 12.
PROG
(Haskell)
199016 = p a002858_list where
p _ 0 = 1
p us'@(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