A342472 T(n,k) is the maximum sum of products of adjacent parts in all compositions of n into k parts: triangle read by rows.
0, 0, 1, 0, 2, 2, 0, 4, 4, 3, 0, 6, 6, 5, 4, 0, 9, 9, 8, 6, 5, 0, 12, 12, 11, 9, 7, 6, 0, 16, 16, 15, 12, 10, 8, 7, 0, 20, 20, 19, 16, 13, 11, 9, 8, 0, 25, 25, 24, 20, 17, 14, 12, 10, 9, 0, 30, 30, 29, 25, 21, 18, 15, 13, 11, 10, 0, 36, 36, 35, 30, 26, 22, 19, 16, 14, 12, 11, 0, 42, 42, 41
Offset: 1
Examples
For n=6 and k=3 for example 6 = 2+3+1 = 1+3+2 obtain 2*3+3*1 = 9 = T(6,3). For n=6 and k=4 for example 6 = 1+2+2+1 obtains 1*2+2*2+2*1=8 =T(6,4). For n=7 and k=4 for example 7 = 1+3+2+1 = 1+2+3+1 obtains 1*2+2*3+3*1 = 11 = T(7,4). For n=7 and k=5 for example 7 = 1+1+2+2+1 = 1+2+2+1+1 obtains 1*2+2*2+2*1+1*1 = 9 = T(7,5). The triangle starts with n>=1 and 1<=k<=n as: 0 0 1 0 2 2 0 4 4 3 0 6 6 5 4 0 9 9 8 6 5 0 12 12 11 9 7 6 0 16 16 15 12 10 8 7 0 20 20 19 16 13 11 9 8 0 25 25 24 20 17 14 12 10 9 0 30 30 29 25 21 18 15 13 11 10 0 36 36 35 30 26 22 19 16 14 12 11 0 42 42 41 36 31 27 23 20 17 15 13 12 0 49 49 48 42 37 32 28 24 21 18 16 14 13 0 56 56 55 49 43 38 33 29 25 22 19 17 15 14
Crossrefs
Programs
-
Maple
# Maximum of Sum_i p_i*p(i+1) over all combinations n=p_1+p_2+..p_k A342472 := proc(n,k) local s,c; s := 0 ; for c in combinat[composition](n,k) do add( c[i]*c[i+1],i=1..nops(c)-1) ; s := max(s,%) ; end do: s ; end proc: for n from 1 to 15 do for k from 1 to n do printf("%3d ",A342472(n,k)) ; end do: printf("\n") ; end do:
Formula
T(n,n) = n-1; where all p_i=1.
T(n,2) = T(n,3) = A002620(n).
T(n,k) >= 2*n-k+((n-k)^2-5)/4, n-k odd, k>=4. - R. J. Mathar, Mar 14 2021
T(n,k) >= n-2+(n-k+2)^2/4, n-k even, k>=4. - R. J. Mathar, Mar 14 2021
Comments