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.

A239960 Number of partitions of n such that (number of distinct parts) = number of 1s.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 2, 1, 4, 2, 6, 6, 8, 10, 16, 15, 22, 32, 31, 47, 54, 72, 81, 111, 123, 166, 189, 244, 274, 366, 411, 509, 614, 736, 872, 1056, 1256, 1479, 1785, 2099, 2479, 2942, 3498, 4028, 4870, 5600, 6655, 7712, 9127, 10512, 12431, 14327, 16776, 19401
Offset: 0

Views

Author

Clark Kimberling, Mar 30 2014

Keywords

Examples

			a(8) counts these 4 partitions :  611, 3311, 32111, 22211.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+`if`(i=1, 0, add(b(n-1-i*j, i-1), j=1..(n-1)/i))))
        end:
    a:= n-> `if`(n=0, 1, b(n-1$2)):
    seq(a(n), n=0..70);  # Alois P. Heinz, Apr 03 2014
  • Mathematica
    z = 54; d[p_] := d[p] = Length[DeleteDuplicates[p]]; Table[Count[IntegerPartitions[n], p_ /; d[p] == Count[p, 1]], {n, 0, z}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + If[i == 1, 0, Sum[b[n - 1 - i*j, i - 1], {j, 1, (n - 1)/i}]]]]; a[n_] := If[n == 0, 1, b[n - 1, n - 1]]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)