%I #37 Oct 20 2023 06:47:27
%S 0,1,1,1,2,1,2,3,3,2,3,5,6,5,3,5,8,11,11,8,5,8,13,19,22,19,13,8,13,21,
%T 32,41,41,32,21,13,21,34,53,73,82,73,53,34,21,34,55,87,126,155,155,
%U 126,87,55,34,55,89,142,213,281,310,281,213,142,89,55,89,144,231,355,494,591,591,494,355,231,144,89
%N Triangle read by rows: T(n,k) = T(n-1,k-1) + T(n-1,k) for 0 < k < n, T(n,0) = T(n,n) = n-th Fibonacci number.
%C Sum of n-th row = 2*A027934(n). - _Reinhard Zumkeller_, Oct 07 2012
%H Reinhard Zumkeller, <a href="/A108617/b108617.txt">Rows n = 0..120 of triangle, flattened</a>
%H Hacéne Belbachir and László Szalay, <a href="http://siauliaims.su.lt/pdfai/2014/Belb_Szal_2014.pdf">On the Arithmetic Triangles</a>, Šiauliai Mathematical Seminar, Vol. 9 (17), 2014. See Fig. 1 p. 18.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FibonacciNumber.html">Fibonacci Number</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PascalsTriangle.html">Pascal's Triangle</a>.
%H Wikipedia, <a href="http://www.wikipedia.org/wiki/Fibonacci_number">Fibonacci number</a>.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Pascal's_triangle">Pascal's triangle</a>.
%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F T(n,0) = T(n,n) = A000045(n);
%F T(n,1) = T(n,n-1) = A000045(n+1) for n>0;
%F T(n,2) = T(n,n-2) = A000045(n+2) - 2 = A001911(n-1) for n>1;
%F Sum_{k=0..n} T(n,k) = 2*A027934(n-1) for n>0.
%F Sum_{k=0..n} (-1)^k*T(n, k) = 2*((n+1 mod 2)*Fibonacci(n-2) + [n=0]). - _G. C. Greubel_, Oct 20 2023
%e Triangle begins:
%e 0;
%e 1, 1;
%e 1, 2, 1;
%e 2, 3, 3, 2;
%e 3, 5, 6, 5, 3;
%e 5, 8, 11, 11, 8, 5;
%e 8, 13, 19, 22, 19, 13, 8;
%e 13, 21, 32, 41, 41, 32, 21, 13;
%e 21, 34, 53, 73, 82, 73, 53, 34, 21;
%e 34, 55, 87, 126, 155, 155, 126, 87, 55, 34;
%e 55, 89, 142, 213, 281, 310, 281, 213, 142, 89, 55;
%p A108617 := proc(n,k)
%p if k = 0 or k=n then
%p combinat[fibonacci](n) ;
%p elif k <0 or k > n then
%p 0 ;
%p else
%p procname(n-1,k-1)+procname(n-1,k) ;
%p end if;
%p end proc: # _R. J. Mathar_, Oct 05 2012
%t a[1]:={0}; a[n_]:= a[n]= Join[{Fibonacci[#]}, Map[Total, Partition[a[#],2,1]], {Fibonacci[#]}]&[n-1]; Flatten[Map[a, Range[15]]] (* _Peter J. C. Moses_, Apr 11 2013 *)
%o (Haskell)
%o a108617 n k = a108617_tabl !! n !! k
%o a108617_row n = a108617_tabl !! n
%o a108617_tabl = [0] : iterate f [1,1] where
%o f row@(u:v:_) = zipWith (+) ([v - u] ++ row) (row ++ [v - u])
%o -- _Reinhard Zumkeller_, Oct 07 2012
%o (Magma)
%o function T(n,k) // T = A108617
%o if k eq 0 or k eq n then return Fibonacci(n);
%o else return T(n-1,k-1) + T(n-1,k);
%o end if;
%o end function;
%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Oct 20 2023
%o (SageMath)
%o def T(n,k): # T = A108617
%o if (k==0 or k==n): return fibonacci(n)
%o else: return T(n-1,k-1) + T(n-1,k)
%o flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Oct 20 2023
%Y Cf. A007318, A074829, A108037.
%K nonn,easy,tabl
%O 0,5
%A _Reinhard Zumkeller_, Jun 12 2005