cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A199017 Number of partitions of n into distinct terms of (1,2)-Ulam sequence, cf. A002858.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 16, 16, 17, 19, 20, 22, 23, 25, 26, 27, 29, 30, 31, 34, 35, 38, 40, 41, 45, 45, 48, 51, 52, 57, 60, 62, 66, 68, 71, 75, 78, 83, 86, 93, 97, 100, 107, 109, 115, 120, 124, 132, 138
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 03 2011

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Haskell
    a199017 = p a002858_list where
       p _  0 = 1
       p (u:us) m | m < u = 0
                  | otherwise = p us (m - u) + p us m