login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A046854 + A065941 - I (Identity matrix).
1

%I #8 Sep 08 2022 08:45:31

%S 1,2,1,2,2,1,2,3,3,1,2,3,6,3,1,2,4,7,7,4,1,2,4,11,8,11,4,1,2,5,12,15,

%T 15,12,5,1,2,5,17,16,30,16,17,5,1,2,6,18,27,36,36,27,18,6,1,2,6,24,28,

%U 63,42,63,28,24,6,1,2,7,25,44,71,84,84,71,44,25,7,1

%N A046854 + A065941 - I (Identity matrix).

%C Row sums = A001595: (1, 3, 5, 9, 15, 25, 41, 67,...).

%H G. C. Greubel, <a href="/A131400/b131400.txt">Rows n = 0..100 of triangle, flattened</a>

%e First few rows of the triangle are:

%e 1;

%e 2, 1;

%e 2, 2, 1;

%e 2, 3, 3, 1;

%e 2, 3, 6, 3, 1;

%e 2, 4, 7, 7, 4, 1;

%e 2, 4, 11, 8, 11, 4, 1; ...

%t With[{B = Binomial}, Table[If[k==n, 1, B[Floor[(n+k)/2], k] + B[n - Floor[(k+1)/2], Floor[k/2]]], {n,0,12}, {k,0,n}]]//Flatten (* _G. C. Greubel_, Jul 13 2019 *)

%o (PARI) b=binomial; T(n,k) = if(k==n, 1, b((n+k)\2, k) + b(n - (k+1)\2, k\2));

%o for(n=0,12, for(k=0,n, print1(T(n,k), ", ", ))) \\ _G. C. Greubel_, Jul 13 2019

%o (Magma) B:=Binomial; [k eq n select 1 else B(Floor((n+k)/2), k) + B(n - Floor((k+1)/2), Floor(k/2)): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jul 13 2019

%o (Sage)

%o def T(n, k):

%o b=binomial;

%o if (k==n): return 1

%o else: return b(floor((n+k)/2), k) + b(n - floor((k+1)/2), floor(k/2))

%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Jul 13 2019

%o (GAP)

%o B:=Binomial;;

%o T:= function(n,k)

%o if k=n then return 1;

%o else return B(Int((n+k)/2), k) + B(n - Int((k+1)/2), Int(k/2));

%o fi;

%o end;

%o Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Jul 13 2019

%Y Cf. A046854, A065941, A001595.

%K nonn,tabl

%O 0,2

%A _Gary W. Adamson_, Jul 06 2007

%E More terms added by _G. C. Greubel_, Jul 13 2019