The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135837 A007318 * a triangle with (1, 2, 2, 4, 4, 8, 8, ...) in the main diagonal and the rest zeros. 5

%I #29 Feb 07 2022 02:31:14

%S 1,1,2,1,4,2,1,6,6,4,1,8,12,16,4,1,10,20,40,20,8,1,12,30,80,60,48,8,1,

%T 14,42,140,140,168,56,16,1,16,56,224,280,448,224,128,16,1,18,72,336,

%U 504,1008,672,576,144,32

%N A007318 * a triangle with (1, 2, 2, 4, 4, 8, 8, ...) in the main diagonal and the rest zeros.

%C This sequence is jointly generated with A117919 as a triangular array of coefficients of polynomials v(n,x): initially, u(1,x) = v(1,x) = 1; for n > 1, u(n,x) = u(n-1,x) + x*v(n-1)x and v(n,x) = 2*x*u(n-1,x) + v(n-1,x). See the Mathematica section. - _Clark Kimberling_, Feb 26 2012

%C Subtriangle of the triangle (1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - _Philippe Deléham_, Mar 19 2012

%H Reinhard Zumkeller, <a href="/A135837/b135837.txt">Rows n = 1..150 of triangle, flattened</a>

%F Binomial transform of a triangle with (1, 2, 2, 4, 4, 8, 8, ...) in the main diagonal and the rest zeros.

%F Sum_{k=1..n} T(n, k) = A001333(n).

%F From _Philippe Deléham_, Mar 19 2012: (Start)

%F As DELTA-triangle with 0 <= k <= n:

%F G.f.: (1-x+2*y*x^2-2*y^2*x^2)/(1-2*x+2*y*x^2-2*y^2*x^2).

%F T(n,k) = 2*T(n-1,k) - T(n-2,k) + 2*T(n-2,k-2), T(0,0) = T(1,0) = T(2,0) = 1, T(1,1) = T(2,2) = 0, T(2,1) = 2, T(n,k) = 0 if k < 0 or if k > n. (End)

%F G.f.: x*y*(1-x+2*x*y)/(1-2*x-2*x^2*y^2+x^2). - _R. J. Mathar_, Aug 11 2015

%F From _G. C. Greubel_, Feb 07 2022: (Start)

%F T(n, n) = A016116(n).

%F T(n, 2) = 2*(n-1).

%F T(n, 3) = 2*A000217(n-2). (End)

%e First few rows of the triangle:

%e 1;

%e 1, 2;

%e 1, 4, 2;

%e 1, 6, 6, 4;

%e 1, 8, 12, 16, 4;

%e 1, 10, 20, 40, 20, 8;

%e 1, 12, 30, 80, 60, 48, 8;

%e ...

%e From _Philippe Deléham_, Mar 19 2012: (Start)

%e (1, 0, 0, 1, 0, 0, ...) DELTA (0, 2, -1, -1, 0, 0, ...) begins:

%e 1;

%e 1, 0;

%e 1, 2, 0;

%e 1, 4, 2, 0;

%e 1, 6, 6, 4, 0;

%e 1, 8, 12, 16, 4, 0;

%e 1, 10, 20, 40, 20, 8, 0;

%e 1, 12, 30, 80, 60, 48, 8, 0; (End)

%t (* First program *)

%t u[1, x_]:= 1; v[1, x_]:= 1; z = 13;

%t u[n_, x_]:= u[n-1, x] + x*v[n-1, x];

%t v[n_, x_]:= 2 x*u[n-1, x] + v[n-1, x];

%t Table[Expand[u[n, x]], {n, 1, z/2}]

%t Table[Expand[v[n, x]], {n, 1, z/2}]

%t cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];

%t TableForm[cu]

%t Flatten[%] (* A117919 *)

%t Table[Expand[v[n, x]], {n, 1, z}]

%t cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];

%t TableForm[cv]

%t Flatten[%] (* A135837 *) (* _Clark Kimberling_, Feb 26 2012 *)

%t (* Second program *)

%t T[n_, k_]:= T[n, k]= If[k<1 || k>n, 0, If[k==1, 1, If[k==n, 2^Floor[n/2], 2*T[n-1, k] - T[n-2, k] + 2*T[n-2, k-2]]]];

%t Table[T[n, k], {n,12}, {k,n}]//Flatten (* _G. C. Greubel_, Feb 07 2022 *)

%o (Haskell)

%o a135837 n k = a135837_tabl !! (n-1) !! (k-1)

%o a135837_row n = a135837_tabl !! (n-1)

%o a135837_tabl = [1] : [1, 2] : f [1] [1, 2] where

%o f xs ys = ys' : f ys ys' where

%o ys' = zipWith3 (\u v w -> 2 * u - v + 2 * w)

%o (ys ++ [0]) (xs ++ [0, 0]) ([0, 0] ++ xs)

%o -- _Reinhard Zumkeller_, Aug 08 2012

%o (Sage)

%o def T(n,k): # A135837

%o if (k<1 or k>n): return 0

%o elif (k==1): return 1

%o elif (k==n): return 2^(n//2)

%o else: return 2*T(n-1, k) - T(n-2, k) + 2*T(n-2, k-2)

%o flatten([[T(n,k) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Feb 07 2022

%Y Cf. A000217, A001333 (row sums), A007318, A016116, A117919, A135838.

%K nice,nonn,tabl

%O 1,3

%A _Gary W. Adamson_, Dec 01 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 04:13 EDT 2024. Contains 373207 sequences. (Running on oeis4.)