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.

A180282 Number of arrangements of n indistinguishable balls in n boxes with the maximum number of balls in any box equal to 2.

Original entry on oeis.org

2, 6, 18, 50, 140, 392, 1106, 3138, 8952, 25652, 73788, 212940, 616226, 1787606, 5196626, 15134930, 44152808, 128996852, 377379368, 1105350728, 3241135526, 9513228122, 27948336380, 82176836300, 241813226150, 712070156202, 2098240353906, 6186675630818
Offset: 2

Views

Author

R. H. Hardin, Aug 24 2010

Keywords

Crossrefs

Column 2 of A180281.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, 0, add(b(n-j, i-1, k), j=0..min(n, k))))
        end:
    a:= n-> (k-> b(n$2, k)-b(n$2, k-1))(2):
    seq(a(n), n=2..30);  # Alois P. Heinz, Aug 17 2018
  • PARI
    for(n=2,29,print1(sum(j=1,n, binomial(n,j)*binomial(n-j,j)),", ")) \\ Hugo Pfoertner, Dec 13 2019

Formula

a(n) = Sum_{j=1..n} binomial(n,j)*binomial(n-j,j) = 2*A097861(n).
a(n) = A002426(n) - 1. - Jeppe Stig Nielsen, Dec 13 2019