[go: up one dir, main page]

login
A131400
A046854 + A065941 - I (Identity matrix).
1
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, 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, 63, 42, 63, 28, 24, 6, 1, 2, 7, 25, 44, 71, 84, 84, 71, 44, 25, 7, 1
OFFSET
0,2
COMMENTS
Row sums = A001595: (1, 3, 5, 9, 15, 25, 41, 67,...).
EXAMPLE
First few rows of the triangle are:
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; ...
MATHEMATICA
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 *)
PROG
(PARI) b=binomial; T(n, k) = if(k==n, 1, b((n+k)\2, k) + b(n - (k+1)\2, k\2));
for(n=0, 12, for(k=0, n, print1(T(n, k), ", ", ))) \\ G. C. Greubel, Jul 13 2019
(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
(Sage)
def T(n, k):
b=binomial;
if (k==n): return 1
else: return b(floor((n+k)/2), k) + b(n - floor((k+1)/2), floor(k/2))
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 13 2019
(GAP)
B:=Binomial;;
T:= function(n, k)
if k=n then return 1;
else return B(Int((n+k)/2), k) + B(n - Int((k+1)/2), Int(k/2));
fi;
end;
Flat(List([0..12], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Jul 13 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Jul 06 2007
EXTENSIONS
More terms added by G. C. Greubel, Jul 13 2019
STATUS
approved