The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228074 A Fibonacci-Pascal triangle read by rows: T(n,0) = Fibonacci(n), T(n,n) = n and for n > 0: T(n,k) = T(n-1,k-1) + T(n-1,k), 0 < k < n. 35

%I #30 Aug 30 2022 14:13:12

%S 0,1,1,1,2,2,2,3,4,3,3,5,7,7,4,5,8,12,14,11,5,8,13,20,26,25,16,6,13,

%T 21,33,46,51,41,22,7,21,34,54,79,97,92,63,29,8,34,55,88,133,176,189,

%U 155,92,37,9,55,89,143,221,309,365,344,247,129,46,10

%N A Fibonacci-Pascal triangle read by rows: T(n,0) = Fibonacci(n), T(n,n) = n and for n > 0: T(n,k) = T(n-1,k-1) + T(n-1,k), 0 < k < n.

%C Sum of n-th row is 2^(n+1) - F(n+1) - 1 = A228078(n+1). - _Greg Dresden_ and _Sadek Mohammed_, Aug 30 2022

%H Reinhard Zumkeller, <a href="/A228074/b228074.txt">Rows n = 0..120 of table, flattened</a>

%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>

%e . 0: 0

%e . 1: 1 1

%e . 2: 1 2 2

%e . 3: 2 3 4 3

%e . 4: 3 5 7 7 4

%e . 5: 5 8 12 14 11 5

%e . 6: 8 13 20 26 25 16 6

%e . 7: 13 21 33 46 51 41 22 7

%e . 8: 21 34 54 79 97 92 63 29 8

%e . 9: 34 55 88 133 176 189 155 92 37 9

%e . 10: 55 89 143 221 309 365 344 247 129 46 10

%e . 11: 89 144 232 364 530 674 709 591 376 175 56 11

%e . 12: 144 233 376 596 894 1204 1383 1300 967 551 231 67 12 .

%p with(combinat);

%p T:= proc (n, k) option remember;

%p if k = 0 then fibonacci(n)

%p elif k = n then n

%p else T(n-1, k-1) + T(n-1, k)

%p end if

%p end proc;

%p seq(seq(T(n, k), k = 0..n), n = 0..12); # _G. C. Greubel_, Sep 05 2019

%t T[n_, k_]:= T[n, k]= If[k==0, Fibonacci[n], If[k==n, n, T[n-1, k-1] + T[n -1, k]]]; Table[T[n, k], {n,0,12}, {k,0,n}] (* _G. C. Greubel_, Sep 05 2019 *)

%o (Haskell)

%o a228074 n k = a228074_tabl !! n !! k

%o a228074_row n = a228074_tabl !! n

%o a228074_tabl = map fst $ iterate

%o (\(u:_, vs) -> (vs, zipWith (+) ([u] ++ vs) (vs ++ [1]))) ([0], [1,1])

%o (PARI) T(n,k) = if(k==0, fibonacci(n), if(k==n, n, T(n-1, k-1) + T(n-1, k)));

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

%o (Sage)

%o def T(n, k):

%o if (k==0): return fibonacci(n)

%o elif (k==n): return n

%o else: return T(n-1, k) + T(n-1, k-1)

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

%o (GAP)

%o T:= function(n,k)

%o if k=0 then return Fibonacci(n);

%o elif k=n then return n;

%o else return T(n-1,k-1) + T(n-1,k);

%o fi;

%o end;

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

%Y Cf. A000045 (left edge), A001477 (right edge), A228078 (row sums), A027988 (maxima per row);

%Y diagonals T(*,k): A000045, A000071, A001924, A014162, A014166, A053739, A053295, A053296, A053308, A053309;

%Y diagonals T(k,*): A001477, A001245, A004006, A027927, A027928, A027929, A027930, A027931, A027932, A027933;

%Y some other Fibonacci-Pascal triangles: A027926, A036355, A037027, A074829, A105809, A109906, A111006, A114197, A162741.

%K nonn,tabl,look

%O 0,5

%A _Reinhard Zumkeller_, Aug 15 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 23:09 EDT 2024. Contains 372720 sequences. (Running on oeis4.)