OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..11325, rows 1 <= n <= 150.
Matthew Blair, Rigoberto Flórez, Antara Mukherjee, Matrices in the Hosoya triangle, arXiv:1808.05278 [math.CO], 2018.
R. Florez, R. Higuita and L. Junes, GCD property of the generalized star of David in the generalized Hosoya triangle, J. Integer Seq., 17 (2014), Article 14.3.6, 17 pp.
R. Florez and L. Junes, GCD properties in Hosoya's triangle, Fibonacci Quart. 50 (2012), 163-174.
H. Hosoya, Fibonacci Triangle, The Fibonacci Quarterly, 14;2, 1976, 173-178.
Wikipedia, Hosoya triangle
FORMULA
T(n,k) = a(k)*a(n - k + 1), a(n) = 2*a (n - 1) + a (n - 2), with a(0) = 0, a(1) = 1; for 0 < n, 0 < k <= n.
EXAMPLE
Triangle begins:
1;
2, 2;
5, 4, 5;
12, 10, 10, 12;
29, 24, 25, 24, 29;
70, 58, 60, 60, 58, 70;
...
MATHEMATICA
a[n_]:=a[n]=If[n<2, n, 2a[n - 1] + a[n - 2]]; Table[a[k] a[n - k + 1], {n, 20}, {k, n}] // Flatten (* Indranil Ghosh, Apr 08 2017, edited by Michael De Vlieger, Nov 14 2018 *)
PROG
(PARI) a(n) = if(n<2, n, 2*a(n - 1) + a(n - 2));
for(n=1, 20, for(k=1, n, print1(a(k)*a(n - k + 1), ", "); ); print(); ) \\ Indranil Ghosh, Apr 08 2017
(Python)
def a(n): return n if n<2 else 2*a(n - 1) + a(n - 2)
for n in range(1, 21): print [a(k)*a(n - k + 1) for k in range(1, n + 1)] # Indranil Ghosh, Apr 08 2017
(C)
#include <stdio.h>
int a(int n){
if(n<2){ return n; }
return 2*a(n - 1) + a(n - 2);
}
int main()
{
int n, k;
for (n=1; n<=20; n++){
for(k=1; k<=n; k++){
printf("%d, ", a(k)*a(n - k + 1));
}
printf("\n");
}
return 0;
} // Indranil Ghosh, Apr 08 2017
(Go)
package main
import "fmt"
func a(n int)int{
if n<2{ return n }
return 2*a(n - 1) + a(n - 2)}
func main() {
for n:=1; n<=20; n++{
for k:=1; k<=n; k++{
fmt.Printf("%d, ", a(k)*a(n - k + 1))}
fmt.Println()
}
} // Indranil Ghosh, Apr 08 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Rigoberto Florez, Mar 20 2017
STATUS
approved