cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A074829 Triangle formed by Pascal's rule, except that the n-th row begins and ends with the n-th Fibonacci number.

This page as a plain text file.
%I A074829 #30 Mar 31 2025 06:43:57
%S A074829 1,1,1,2,2,2,3,4,4,3,5,7,8,7,5,8,12,15,15,12,8,13,20,27,30,27,20,13,
%T A074829 21,33,47,57,57,47,33,21,34,54,80,104,114,104,80,54,34,55,88,134,184,
%U A074829 218,218,184,134,88,55,89,143,222,318,402,436,402,318,222,143,89
%N A074829 Triangle formed by Pascal's rule, except that the n-th row begins and ends with the n-th Fibonacci number.
%H A074829 Reinhard Zumkeller, <a href="/A074829/b074829.txt">Rows n = 1..120 of table, flattened</a>
%H A074829 Hebert Pérez-Rosés, <a href="https://arxiv.org/abs/2503.17462">Asymptotic Analysis of Central Binomiacci Numbers</a>, arXiv:2503.17462 [math.CO], 2025.
%H A074829 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%e A074829 The first and second Fibonacci numbers are 1, 1, so the first and second rows of the triangle are 1; 1 1; respectively. The third row of the triangle begins and ends with the third Fibonacci number, 2 and the middle term is the sum of the contiguous two terms in the second row, i.e., 1 + 1 = 2, so the third row is 2 2 2.
%e A074829 Triangle begins:
%e A074829    1;
%e A074829    1,  1;
%e A074829    2,  2,  2;
%e A074829    3,  4,  4,   3;
%e A074829    5,  7,  8,   7,   5;
%e A074829    8, 12, 15,  15,  12,   8;
%e A074829   13, 20, 27,  30,  27,  20, 13;
%e A074829   21, 33, 47,  57,  57,  47, 33, 21;
%e A074829   34, 54, 80, 104, 114, 104, 80, 54, 34;
%e A074829   ...
%e A074829 Formatted as a symmetric triangle:
%e A074829                            1;
%e A074829                         1,    1;
%e A074829                      2,    2,    2;
%e A074829                   3,    4,    4,    3;
%e A074829                5,    7,    8,    7,    5;
%e A074829             8,   12,   15,   15,   12,    8;
%e A074829         13,   20,   27,   30,   27,   20,   13;
%e A074829      21,   33,   47,   57,   57,   47,   33,   21;
%e A074829   34,   54,   80,  104,  114,  104,   80,   54,   34;
%p A074829 A074829 := proc(n,k)
%p A074829     option remember ;
%p A074829     if k=1 or k=n then
%p A074829         combinat[fibonacci](n) ;
%p A074829     else
%p A074829         procname(n-1,k-1)+procname(n-1,k) ;
%p A074829     end if;
%p A074829 end proc:
%p A074829 seq(seq(A074829(n,k),k=1..n),n=1..12) ; # _R. J. Mathar_, Mar 31 2025
%t A074829 T[n_, 1]:= Fibonacci[n]; T[n_, n_]:= Fibonacci[n]; T[n_, k_]:= T[n-1, k-1] + T[n-1, k]; Table[T[n, k], {n, 1, 12}, {k, 1, n}]//Flatten (* _G. C. Greubel_, Jul 12 2019 *)
%o A074829 (Haskell)
%o A074829 a074829 n k = a074829_tabl !! (n-1) !! (k-1)
%o A074829 a074829_row n = a074829_tabl !! (n-1)
%o A074829 a074829_tabl = map fst $ iterate
%o A074829    (\(u:_, vs) -> (vs, zipWith (+) ([u] ++ vs) (vs ++ [u]))) ([1], [1,1])
%o A074829 -- _Reinhard Zumkeller_, Aug 15 2013
%o A074829 (PARI) T(n,k) = if(k==1 || k==n, fibonacci(n), T(n-1,k-1) + T(n-1,k));
%o A074829 for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Jul 12 2019
%o A074829 (Sage)
%o A074829 def T(n, k):
%o A074829     if (k==1 or k==n): return fibonacci(n)
%o A074829     else: return T(n-1, k-1) + T(n-1, k)
%o A074829 [[T(n, k) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Jul 12 2019
%o A074829 (GAP)
%o A074829 T:= function(n,k)
%o A074829     if k=1 then return Fibonacci(n);
%o A074829     elif k=n then return Fibonacci(n);
%o A074829     else return T(n-1,k-1) + T(n-1,k);
%o A074829     fi;
%o A074829   end;
%o A074829 Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # _G. C. Greubel_, Jul 12 2019
%Y A074829 Some other Fibonacci-Pascal triangles: A027926, A036355, A037027, A105809, A108617, A109906, A111006, A114197, A162741, A228074.
%Y A074829 Cf. A074878 (row sums).
%K A074829 easy,nonn,tabl
%O A074829 1,4
%A A074829 _Joseph L. Pe_, Sep 30 2002
%E A074829 More terms from _Philippe Deléham_, Sep 20 2006
%E A074829 Data error in 7th row fixed by _Reinhard Zumkeller_, Aug 15 2013