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.

A100881 Number of partitions of n in which the sequence of frequencies of the summands is decreasing.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 6, 5, 7, 8, 8, 9, 13, 10, 13, 15, 16, 18, 21, 17, 24, 28, 26, 26, 36, 32, 38, 42, 40, 46, 52, 48, 63, 63, 59, 63, 85, 77, 81, 92, 89, 102, 116, 98, 122, 134, 130, 140, 157, 145, 165, 182, 190, 191, 207, 195, 235, 259, 232, 252, 293, 279
Offset: 0

Views

Author

David S. Newman, Nov 21 2004

Keywords

Examples

			a(7) = 4 because in each of the four partitions [7], [3,3,1], [2,2,2,1], [1,1,1,1,1,1,1] the frequency with which a summand is used decreases as the summand decreases.
		

Crossrefs

Programs

  • Haskell
    a100881 = p 0 0 1 where
       p m m' k x | x == 0    = if m > m' || m == 0 then 1 else 0
                  | x < k     = 0
                  | m == 0    = p 1 m' k (x - k) + p 0 m' (k + 1) x
                  | otherwise = p (m + 1) m' k (x - k) +
                                if m > m' then p 0 m (k + 1) x else 0
    -- Reinhard Zumkeller, Dec 27 2012
  • Maple
    b:= proc(n, i, t) option remember;
          if n<0 then 0
        elif n=0 then 1
        elif i=0 then 0
        else      b(n, i-1, t)
             +add(b(n-i*j, i-1, j), j=1..min(t-1, floor(n/i)))
          fi
        end:
    a:= n-> b(n, n, n+1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Feb 21 2011
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Which[n<0, 0, n==0, 1, i==0, 0, True, b[n, i-1, t] + Sum[b[n-i*j, i-1, j], {j, 1, Min[t-1, Floor[n/i]]}]]; a[n_] := b[n, n, n+1]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Feb 21 2011