The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A134968 Number of convex functions from {1,...,n} to itself. 0

%I #4 Mar 14 2015 21:06:52

%S 1,1,4,16,54,168,462,1212,2937,6832,15135,32430,66898,134710,263466,

%T 504308,944208,1736575,3134832,5574947,9760954,16868418,28771587,

%U 48513127,80867486,133455462,218041708,353039664,566580113,901958971,1424480451,2233367056

%N Number of convex functions from {1,...,n} to itself.

%C That is, the number of sequences of length n, taking values in {1,...,n} that have nondecreasing first differences (nonnegative second differences).

%F See Mathematica code.

%e 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 (*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 (*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 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}]

%K nonn,nice

%O 0,3

%A _Jacob A. Siehler_, Feb 04 2008, Feb 06 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 10 10:09 EDT 2023. Contains 363199 sequences. (Running on oeis4.)