login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A134968
Number of convex functions from {1,...,n} to itself.
0
1, 1, 4, 16, 54, 168, 462, 1212, 2937, 6832, 15135, 32430, 66898, 134710, 263466, 504308, 944208, 1736575, 3134832, 5574947, 9760954, 16868418, 28771587, 48513127, 80867486, 133455462, 218041708, 353039664, 566580113, 901958971, 1424480451, 2233367056
OFFSET
0,3
COMMENTS
That is, the number of sequences of length n, taking values in {1,...,n} that have nondecreasing first differences (nonnegative second differences).
FORMULA
See Mathematica code.
EXAMPLE
a(3)=16: the 16 sequences are 111, 112, 113, 123, 211, 212, 213, 222, 223, 311, 312, 313, 321, 322, 323 and 333.
MATHEMATICA
(*P[n, k]=number of ways to partition n into exactly k parts*) P[n_Integer, n_Integer] = 1; P[n_Integer, k_Integer] := P[n, k] = Sum[P[n - k, r], {r, 1, Min[n - k, k]}]
(*q[n, k]=number of ways to partition n into k-or-fewer parts*) q[0, 0] = 1; q[n_Integer, 0] = 0; q[n_Integer, k_Integer] := q[n, k] = q[n, k - 1] + P[n, k]
a[n_] := Sum[(n - Max[f, r])*P[r, s]*q[f, n - 1 - s], {r, 0, n - 1}, {s, 0, n - 1}, {f, 0, n - 1}]
CROSSREFS
Sequence in context: A358232 A239032 A254823 * A238419 A267227 A223944
KEYWORD
nonn,nice
AUTHOR
Jacob A. Siehler, Feb 04 2008, Feb 06 2008
STATUS
approved