%I #8 Sep 08 2022 08:45:25
%S 1,1,1,1,6,1,1,16,26,1,1,36,116,106,1,1,76,376,676,426,1,1,156,1056,
%T 2856,3556,1706,1,1,316,2736,9936,18536,17636,6826,1,1,636,6736,30816,
%U 76816,109416,84196,27306,1,1,1276,16016,88576,276896,526096,606056,391396,109226,1
%N Triangular array read by rows: T(n,1) = T(n,n) = 1, T(n,k) = 4*T(n-1, k-1) + 2*T(n-1, k).
%C Second column is A048487.
%C Second diagonal is A020989.
%D TERMESZET VILAGA XI.TERMESZET-TUDOMANY DIAKPALYAZAT 133.EVF. 6.SZ. jun. 2002. Vegh Lea (and Vegh Erika): "Pascal-tipusu haromszogek" http://www.kfki.hu/chemonet/TermVil/tv2002/tv0206/tartalom.html
%H G. C. Greubel, <a href="/A119726/b119726.txt">Rows n = 1..100 of triangle, flattened</a>
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 6, 1;
%e 1, 16, 26, 1;
%e 1, 36, 116, 106, 1;
%e 1, 76, 376, 676, 426, 1;
%e 1, 156, 1056, 2856, 3556, 1706, 1;
%e 1, 316, 2736, 9936, 18536, 17636, 6826, 1;
%e 1, 636, 6736, 30816, 76816, 109416, 84196, 27306, 1;
%e 1, 1276, 16016, 88576, 276896, 526096, 606056, 391396, 109226, 1;
%p T:= proc(n, k) option remember;
%p if k=1 and k=n then 1
%p else 4*T(n-1, k-1) + 2*T(n-1, k)
%p fi
%p end: seq(seq(T(n, k), k=1..n), n=1..12); # _G. C. Greubel_, Nov 18 2019
%t T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, 4*T[n-1, k-1] + 2*T[n-1, k]]; Table[T[n,k], {n,10}, {k,n}]//Flatten (* _G. C. Greubel_, Nov 18 2019 *)
%o (PARI) T(n,k) = if(k==1 || k==n, 1, 4*T(n-1,k-1) + 2*T(n-1,k));
%o (Magma)
%o function T(n,k)
%o if k eq 1 or k eq n then return 1;
%o else return 4*T(n-1,k-1) + 2*T(n-1,k);
%o end if;
%o return T;
%o end function;
%o [T(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Nov 18 2019
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k==1 or k==n): return 1
%o else: return 4*T(n-1, k-1) + 2*T(n-1, k)
%o [[T(n, k) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Nov 18 2019
%Y Cf. A007318, A020989, A048483, A048487, A119725, A119727, A123208.
%K easy,nonn,tabl
%O 1,5
%A _Zerinvary Lajos_, Jun 14 2006
%E Edited by _Don Reble_, Jul 24 2006