login
A180282
Number of arrangements of n indistinguishable balls in n boxes with the maximum number of balls in any box equal to 2.
2
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,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..1665 (terms n=2..59 from R. H. Hardin)
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
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
PROG
(PARI) for(n=2, 29, print1(sum(j=1, n, binomial(n, j)*binomial(n-j, j)), ", ")) \\ Hugo Pfoertner, Dec 13 2019
CROSSREFS
Column 2 of A180281.
Sequence in context: A304962 A372481 A361286 * A081154 A002900 A309087
KEYWORD
nonn
AUTHOR
R. H. Hardin, Aug 24 2010
STATUS
approved