# [seqfan] Re: Help with A002793 needed/Karol A. Penson/2

Karol penson at lptl.jussieu.fr
Tue Jul 6 00:01:43 CEST 2010

``` Amazing achievement ! , Thanks , Karol

Richard Mathar a écrit :
> Lisons http://list.seqfan.eu/pipermail/seqfan/2010-July/005230.html :
>
> kp>  a(2)=4    =3+1
> kp>  a(3)=20  =11+8+1
> kp>  a(4)=124=50+58+15+1
> kp>  a(5)=920=274+444+177+24+1,
>
> One can get an interpretation if one follows the advice
> given in  A002793 to look at this as the bisection of A056952.
>
> The recurrence of A056952(n) can be looked at as a path
> with jumps/skips of length 1 or 2 totaling n, where jumps of length 1
> get weight 1, which is the factor 1 in front of a(n-1),
> and jumps of length 2 get weight floor(n/2), which is the factor in front
> of a(n-2).
>
> Obtain A056952(n) as follows: write down all compositions
> of n such that all addends are either 1 or 2, and such that
> the first addend is 1 (this last restriction comes form A056952(0)=0).
> Then associate with each composition a product of weights
> as computed above, so the n in the weight is the product of
> all floor(s/2) where s is the "partial sum" along the composition at
> the point one sees a 2. Then the terms in the triangle are the
> sums of the weights for all compositions of fixed common length.
>
> Example of n=8:
> [1, 2, 2, 2, 1], 6 = floor(3/2)*floor(5/2)*floor(7/2)
> [1, 2, 2, 1, 2], 8   = floor(3/2)*floor(5/2)*floor(8/2)
> [1, 2, 1, 2, 2], 12  = floor(3/2)*floor(6/2)*floor(8/2)
> [1, 1, 2, 2, 2], 24
>    50 = 6+8+12+24
> [1, 2, 2, 1, 1, 1], 2
> [1, 2, 1, 2, 1, 1], 3
> [1, 1, 2, 2, 1, 1], 6
> [1, 2, 1, 1, 2, 1], 3
> [1, 1, 2, 1, 2, 1], 6
> [1, 1, 1, 2, 2, 1], 6
> [1, 2, 1, 1, 1, 2], 4
> [1, 1, 2, 1, 1, 2], 8
> [1, 1, 1, 2, 1, 2], 8
> [1, 1, 1, 1, 2, 2], 12
>     58 = 2+3+6+3+6+6+4+8+8+12
> [1, 2, 1, 1, 1, 1, 1], 1
> [1, 1, 2, 1, 1, 1, 1], 2
> [1, 1, 1, 2, 1, 1, 1], 2
> [1, 1, 1, 1, 2, 1, 1], 3
> [1, 1, 1, 1, 1, 2, 1], 3
> [1, 1, 1, 1, 1, 1, 2], 4
>     15 = 1+2+2+3+3+4
> [1, 1, 1, 1, 1, 1, 1, 1], 1
>     1 =1
> 124
>
> Example of n=10:
>
> [1, 2, 2, 2, 2, 1], 24
> [1, 2, 2, 2, 1, 2], 30
> [1, 2, 2, 1, 2, 2], 40
> [1, 2, 1, 2, 2, 2], 60
> [1, 1, 2, 2, 2, 2], 120
>    274 = 24+30+40+60+120
> [1, 2, 2, 2, 1, 1, 1], 6
> [1, 2, 2, 1, 2, 1, 1], 8
> [1, 2, 1, 2, 2, 1, 1], 12
> [1, 1, 2, 2, 2, 1, 1], 24
> [1, 2, 2, 1, 1, 2, 1], 8
> [1, 2, 1, 2, 1, 2, 1], 12
> [1, 1, 2, 2, 1, 2, 1], 24
> [1, 2, 1, 1, 2, 2, 1], 12
> [1, 1, 2, 1, 2, 2, 1], 24
> [1, 1, 1, 2, 2, 2, 1], 24
> [1, 2, 2, 1, 1, 1, 2], 10
> [1, 2, 1, 2, 1, 1, 2], 15
> [1, 1, 2, 2, 1, 1, 2], 30
> [1, 2, 1, 1, 2, 1, 2], 15
> [1, 1, 2, 1, 2, 1, 2], 30
> [1, 1, 1, 2, 2, 1, 2], 30
> [1, 2, 1, 1, 1, 2, 2], 20
> [1, 1, 2, 1, 1, 2, 2], 40
> [1, 1, 1, 2, 1, 2, 2], 40
> [1, 1, 1, 1, 2, 2, 2], 60
>    444 = 6+8+12+24+8+...+60
> [1, 2, 2, 1, 1, 1, 1, 1], 2
> [1, 2, 1, 2, 1, 1, 1, 1], 3
> [1, 1, 2, 2, 1, 1, 1, 1], 6
> [1, 2, 1, 1, 2, 1, 1, 1], 3
> [1, 1, 2, 1, 2, 1, 1, 1], 6
> [1, 1, 1, 2, 2, 1, 1, 1], 6
> [1, 2, 1, 1, 1, 2, 1, 1], 4
> [1, 1, 2, 1, 1, 2, 1, 1], 8
> [1, 1, 1, 2, 1, 2, 1, 1], 8
> [1, 1, 1, 1, 2, 2, 1, 1], 12
> [1, 2, 1, 1, 1, 1, 2, 1], 4
> [1, 1, 2, 1, 1, 1, 2, 1], 8
> [1, 1, 1, 2, 1, 1, 2, 1], 8
> [1, 1, 1, 1, 2, 1, 2, 1], 12
> [1, 1, 1, 1, 1, 2, 2, 1], 12
> [1, 2, 1, 1, 1, 1, 1, 2], 5
> [1, 1, 2, 1, 1, 1, 1, 2], 10
> [1, 1, 1, 2, 1, 1, 1, 2], 10
> [1, 1, 1, 1, 2, 1, 1, 2], 15
> [1, 1, 1, 1, 1, 2, 1, 2], 15
> [1, 1, 1, 1, 1, 1, 2, 2], 20
>    177
> [1, 2, 1, 1, 1, 1, 1, 1, 1], 1
> [1, 1, 2, 1, 1, 1, 1, 1, 1], 2
> [1, 1, 1, 2, 1, 1, 1, 1, 1], 2
> [1, 1, 1, 1, 2, 1, 1, 1, 1], 3
> [1, 1, 1, 1, 1, 2, 1, 1, 1], 3
> [1, 1, 1, 1, 1, 1, 2, 1, 1], 4
> [1, 1, 1, 1, 1, 1, 1, 2, 1], 4
> [1, 1, 1, 1, 1, 1, 1, 1, 2], 5
>    24
> [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 1
>    1
> 920
> 274+444+177+24+1=920
>
> Example of n=12:
> 1764+3708+2016+416+35+1 = 7940
> Example of n=14:
> 13068+33984+23533+6560+835+48+1 = 78040
>
> Apparently the first but last term in each row is A005563.
> Apparently the first column in the triangle is A000254
> Apparently the second column in the triangle is A002538
> The last term in each row is 1.
>
> In Maple:
> n := 10; #or whatever the even index in A056952 may be
> a := 0 ;
> for c from 1 to n do
>         fpar := 0 ;
>         com := combinat[composition](n,c) ;
>         for co in com do
>                 if max(op(co))<3 and op(1,co) = 1 then
>                         psu := 1 ;
>                         f := 1 ;
>                         for pos from 2 to nops(co) do
>                                 psu := psu+op(pos,co) ;
>                                 if op(pos,co) = 2 then
>                                         f := f*floor(psu/2) ;
>                                 end if;
>                         end do:
>                         a := a+f ;
>                         fpar := fpar+f ;
>                         print(co,f) ;
>                 end if;
>         end do:
>         print(fpar) ;
> end do:
> print(a) ;
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>

```