A199016 Number of partitions of n into terms of (1,2)-Ulam sequence, cf. A002858.
1, 1, 2, 3, 5, 6, 10, 12, 18, 22, 30, 37, 50, 60, 78, 94, 120, 143, 179, 213, 262, 309, 376, 440, 531, 618, 737, 855, 1012, 1167, 1372, 1575, 1840, 2104, 2442, 2783, 3214, 3649, 4193, 4746, 5430, 6126, 6980, 7853, 8914, 10002, 11311, 12660, 14274, 15934
Offset: 0
Keywords
Examples
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.
Links
- Eric Weisstein's World of Mathematics, Ulam Sequence
- Wikipedia, Ulam number
- Index entries for Ulam numbers
Programs
-
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