[go: up one dir, main page]

login
A074829
Triangle formed by Pascal's rule, except that the n-th row begins and ends with the n-th Fibonacci number.
18
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, 21, 33, 47, 57, 57, 47, 33, 21, 34, 54, 80, 104, 114, 104, 80, 54, 34, 55, 88, 134, 184, 218, 218, 184, 134, 88, 55, 89, 143, 222, 318, 402, 436, 402, 318, 222
OFFSET
1,4
EXAMPLE
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.
Triangle begins:
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;
21, 33, 47, 57, 57, 47, 33, 21;
34, 54, 80, 104, 114, 104, 80, 54, 34;
...
Formatted as a symmetric triangle:
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;
21, 33, 47, 57, 57, 47, 33, 21;
34, 54, 80, 104, 114, 104, 80, 54, 34;
MATHEMATICA
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 *)
PROG
(Haskell)
a074829 n k = a074829_tabl !! (n-1) !! (k-1)
a074829_row n = a074829_tabl !! (n-1)
a074829_tabl = map fst $ iterate
(\(u:_, vs) -> (vs, zipWith (+) ([u] ++ vs) (vs ++ [u]))) ([1], [1, 1])
-- Reinhard Zumkeller, Aug 15 2013
(PARI) T(n, k) = if(k==1 || k==n, fibonacci(n), T(n-1, k-1) + T(n-1, k));
for(n=1, 12, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Jul 12 2019
(Sage)
def T(n, k):
if (k==1 or k==n): return fibonacci(n)
else: return T(n-1, k-1) + T(n-1, k)
[[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jul 12 2019
(GAP)
T:= function(n, k)
if k=1 then return Fibonacci(n);
elif k=n then return Fibonacci(n);
else return T(n-1, k-1) + T(n-1, k);
fi;
end;
Flat(List([1..15], n-> List([1..n], k-> T(n, k) ))); # G. C. Greubel, Jul 12 2019
CROSSREFS
Some other Fibonacci-Pascal triangles: A027926, A036355, A037027, A105809, A108617, A109906, A111006, A114197, A162741, A228074.
Sequence in context: A051601 A296612 A193921 * A060243 A054225 A322210
KEYWORD
easy,nonn,tabl
AUTHOR
Joseph L. Pe, Sep 30 2002
EXTENSIONS
More terms from Philippe Deléham, Sep 20 2006
Data error in 7th row fixed by Reinhard Zumkeller, Aug 15 2013
STATUS
approved