OFFSET
1,2
COMMENTS
Upper bound on A088532(n).
The number of patterns of length k in a permutation of length n is bounded above by k! and binomial(n,k). The total number of patterns in a permutation of length n is therefore bounded above by the sum of the smaller of these two upper bounds.
FORMULA
a(n) ~ 2^n. - Vaclav Kotesovec, Aug 03 2015
MATHEMATICA
Table[Sum[Min[k!, Binomial[n, k]], {k, 1, n}], {n, 1, 40}]
PROG
(PARI) a(n) = sum(k=1, n, min(k!, binomial(n, k))); \\ Michel Marcus, Nov 14 2019
(Magma) [&+[Min(Factorial(k), Binomial(n, k)):k in [1..n]]:n in [1..34]]; // Marius A. Burtea, Nov 14 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Rob Pratt, Apr 10 2004
STATUS
approved