OFFSET
1,5
REFERENCES
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
LINKS
G. C. Greubel, Rows n = 1..100 of triangle, flattened
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 7, 1;
1, 19, 37, 1;
1, 43, 169, 187, 1;
1, 91, 553, 1219, 937, 1;
1, 187, 1561, 5203, 7969, 4687, 1;
1, 379, 4057, 18211, 41953, 49219, 23437, 1;
1, 763, 10009, 56707, 174961, 308203, 292969, 117187, 1;
1, 1531, 23833, 163459, 633457, 1491211, 2126953, 1699219, 585937, 1;
MAPLE
T:= proc(n, k) option remember;
if k=1 and k=n then 1
else 5*T(n-1, k-1) + 2*T(n-1, k)
fi
end: seq(seq(T(n, k), k=1..n), n=1..12); # G. C. Greubel, Nov 18 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, 5*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 *)
PROG
(PARI) T(n, k) = if(k==1 || k==n, 1, 5*T(n-1, k-1) + 2*T(n-1, k)); \\ G. C. Greubel, Nov 18 2019
(Magma)
function T(n, k)
if k eq 1 or k eq n then return 1;
else return 5*T(n-1, k-1) + 2*T(n-1, k);
end if;
return T;
end function;
[T(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 18 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==1 or k==n): return 1
else: return 5*T(n-1, k-1) + 2*T(n-1, k)
[[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 18 2019
CROSSREFS
KEYWORD
AUTHOR
Zerinvary Lajos, Jun 14 2006
EXTENSIONS
Edited by Don Reble, Jul 24 2006
STATUS
approved