OFFSET
0,5
LINKS
Eric Weisstein's World of Mathematics, Ulam Sequence
Wikipedia, Ulam number
EXAMPLE
The first terms of A002859 are 1, 3, 4, 5, 6, 8, 10, 12, 17, 21, ...
a(10) = #{10, 6+4, 6+3+1, 5+4+1} = 4;
a(11) = #{10+1, 8+3, 6+5, 6+4+1} = 4;
a(12) = #{12, 8+4, 8+3+1, 6+5+1, 5+4+3} = 5.
PROG
(Haskell)
a199119 = p a002859_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