|
Search: id:A134968
|
|
|
| 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
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
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: A056589 A074407 A121159 this_sequence A127634 A115108 A127393
Adjacent sequences: A134965 A134966 A134967 this_sequence A134969 A134970 A134971
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
Jacob A. Siehler (siehlerj(AT)wlu.edu), Feb 04 2008, Feb 06 2008
|
|
|
Search completed in 0.002 seconds
|