login
A284127
Hosoya triangle of Pell type, read by rows.
1
1, 2, 2, 5, 4, 5, 12, 10, 10, 12, 29, 24, 25, 24, 29, 70, 58, 60, 60, 58, 70, 169, 140, 145, 144, 145, 140, 169, 408, 338, 350, 348, 348, 350, 338, 408, 985, 816, 845, 840, 841, 840, 845, 816, 985, 2378, 1970, 2040, 2028, 2030, 2030, 2028, 2040, 1970, 2378, 5741, 4756, 4925, 4896, 4901, 4900, 4901, 4896, 4925, 4756, 5741
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
Sequence in context: A337662 A286099 A098366 * A261114 A284827 A241306
KEYWORD
nonn,tabl
AUTHOR
Rigoberto Florez, Mar 20 2017
STATUS
approved