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!)
A156319 Triangle by columns: (1, 2, 0, 0, 0, ...) in every column. 2

%I #18 Sep 08 2022 08:45:41

%S 1,2,1,0,2,1,0,0,2,1,0,0,0,2,1,0,0,0,0,2,1,0,0,0,0,0,2,1,0,0,0,0,0,0,

%T 2,1,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,2,1,0,0,

%U 0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,2,1

%N Triangle by columns: (1, 2, 0, 0, 0, ...) in every column.

%C Binomial transform of the triangle = A110813.

%C Eigensequence of the triangle = A001045

%C Inverse = a triangle with (1, -2, 4, -8, 16, ...) in every column.

%C Triangle T(n,k), 0 <= k <= n, given by [2,-2,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - _Philippe Deléham_, Feb 08 2009

%H G. C. Greubel, <a href="/A156319/b156319.txt">Rows n = 1..100 of triangle, flattened</a>

%F Triangle read by rows, T(n,k) = 1 if n=k, 2 if k = n-1, 0 otherwise.

%F By columns, (1, 2, 0, 0, 0, ...) in every column.

%F T(n,k) = A097806(n,k)*2^(n-k). - _Philippe Deléham_, Feb 08 2009

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

%e First few rows of the triangle:

%e 1;

%e 2, 1;

%e 0, 2, 1;

%e 0, 0, 2, 1;

%e 0, 0, 0, 2, 1;

%e 0, 0, 0, 0, 2, 1;

%e 0, 0, 0, 0, 0, 2, 1;

%e 0, 0, 0, 0, 0, 0, 2, 1;

%e 0, 0, 0, 0, 0, 0, 0, 2, 1;

%e ...

%p T:= proc (n) option remember;

%p if k=n then 1

%p elif k=n-1 then 2

%p else 0 fi;

%p end proc;

%p seq(seq(T(n,k), k=1..n), n = 1..15); # _G. C. Greubel_, Sep 20 2019

%t Table[If[k==n,1, If[k==n-1, 2, 0]], {n,15}, {k,n}]//Flatten (* _G. C. Greubel_, Sep 20 2019 *)

%t Join[{1},Flatten[Table[PadRight[{2,1},n,0],{n,3,20}]]] (* _Harvey P. Dale_, Feb 28 2022 *)

%o (PARI) T(n,k) = if(k==n, 1, if(k==n-1, 2, 0)); \\ _G. C. Greubel_, Sep 20 2019

%o (Magma) T:= func< n,k | k eq n select 1 else k eq n-1 select 2 else 0 >;

%o [T(n,k): k in [1..n], n in [1..15]]; // _G. C. Greubel_, Sep 20 2019

%o (Sage)

%o def T(n,k):

%o if (k==n): return 1

%o elif (k==n-1): return 2

%o else: return 0

%o [[T(n,k) for k in (1..n)] for n in (1..15)] # _G. C. Greubel_, Sep 20 2019

%o (GAP)

%o T:= function(n,k)

%o if k=n then return 1;

%o elif k=n-1 then return 2;

%o else return 0;

%o fi;

%o end;

%o Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # _G. C. Greubel_, Sep 20 2019

%Y Cf. A001045, A097806, A110813.

%K nonn,tabl,easy

%O 1,2

%A _Gary W. Adamson_, Feb 07 2009

%E More terms added by _G. C. Greubel_, Sep 20 2019

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 May 27 20:38 EDT 2024. Contains 372882 sequences. (Running on oeis4.)