A199119 Number of partitions of n into distinct terms of (1,3)-Ulam sequence, cf. A002859.
1, 1, 0, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7, 7, 8, 10, 9, 9, 12, 13, 13, 13, 14, 17, 18, 18, 19, 21, 23, 25, 26, 27, 30, 33, 33, 36, 40, 42, 43, 45, 51, 55, 55, 57, 62, 67, 71, 72, 76, 82, 87, 91, 95, 100, 107, 112, 116, 124, 132, 137, 143, 151, 159, 170
Offset: 0
Keywords
Examples
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.
Links
- Eric Weisstein's World of Mathematics, Ulam Sequence
- Wikipedia, Ulam number
- Index entries for Ulam numbers
Programs
-
Haskell
a199119 = p a002859_list where p _ 0 = 1 p (u:us) m | m < u = 0 | otherwise = p us (m - u) + p us m