%I A134968
%S A134968 1,4,16,54,168,462,1212,2937,6832,15135,32430,66898,134710,263466,
%T A134968 504308,944208,1736575,3134832,5574947,9760954,16868418,28771587,
%U A134968 48513127,80867486,133455462,218041708,353039664,566580113,901958971
%N A134968 Number of convex functions from {1,...,n} to itself.
%C A134968 That is, the number of sequences of length n, taking values in {1,...,
n} that have nondecreasing first differences (nonnegative second
differences).
%F A134968 See Mathematica code.
%e A134968 a(3)=16: the 16 sequences are 111, 112, 113, 123, 211, 212, 213, 222,
223, 311, 312, 313, 321, 322, 323 and 333.
%t A134968 (*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]}]
%t A134968 (*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]
%t A134968 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}]
%Y A134968 Sequence in context: A056589 A074407 A121159 this_sequence A127634 A115108
A127393
%Y A134968 Adjacent sequences: A134965 A134966 A134967 this_sequence A134969 A134970
A134971
%K A134968 nonn,nice
%O A134968 1,2
%A A134968 Jacob A. Siehler (siehlerj(AT)wlu.edu), Feb 04 2008, Feb 06 2008
|