OFFSET
1,3
COMMENTS
REFERENCES
Boris A. Bondarenko, "Generalized Pascal Triangles and Pyramids" Fibonacci Association, 1993, p. 37
LINKS
Reinhard Zumkeller, Rows n=0..149 of triangle, flattened
FORMULA
EXAMPLE
Triangle begins:
1
1 3
1 5 3
1 7 11 3
1 9 23 17 3
MATHEMATICA
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := u[n - 1, x] + v[n - 1, x]
v[n_, x_] := 2 x*u[n - 1, x] + x*v[n - 1, x] + 1
Table[Factor[u[n, x]], {n, 1, z}]
Table[Factor[v[n, x]], {n, 1, z}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A207624 *)
Table[Expand[v[n, x]], {n, 1, z}]
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A102662 *)
(* Clark Kimberling, Feb 20 2012 *)
PROG
(PARI) T(k, r)=if(r>k, 0, if(k==1, 1, if(k==2, if(r==1, 1, 3), if(r==1, 1, if(r==k, 3, T(k-1, r-1)+T(k-1, r)+T(k-2, r-1)))))) BM(n) = M=matrix(n, n); for(i=1, n, for(j=1, n, M[i, j]=T(i, j))); M M=BM(10) for(i=1, 10, s=0; for(j=1, i, s+=M[i, j]); print1(s, ", "))
(Haskell)
a102662 n k = a102662_tabl !! n !! k
a102662_row n = a102662_tabl !! n
a102662_tabl = [1] : [1, 3] : f [1] [1, 3] where
f xs ys = zs : f ys zs where
zs = zipWith (+) ([0] ++ xs ++ [0]) $
zipWith (+) ([0] ++ ys) (ys ++ [0])
-- Reinhard Zumkeller, Feb 23 2012
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Lambert Klasen (lambert.klasen(AT)gmx.net) and Gary W. Adamson, Feb 03 2005
STATUS
approved