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!)
A128174 Transform, (1,0,1,...) in every column. 57

%I #36 Sep 08 2022 08:45:30

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

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

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

%N Transform, (1,0,1,...) in every column.

%C Inverse of the triangle = a tridiagonal matrix with (1,1,1,...) in the superdiagonal, (0,0,0,...) in the main diagonal and (-1,-1,-1,...) in the subdiagonal.

%C Riordan array (1/(1-x^2), x) with inverse (1-x^2,x). - _Paul Barry_, Sep 10 2008

%C The position of 1's in this sequence is equivalent to A246705, and the position of 0's is equivalent to A246706. - _Bernard Schott_, Jun 05 2019

%H G. C. Greubel, <a href="/A128174/b128174.txt">Table of n, a(n) for the first 100 rows, flattened</a>

%F A lower triangular matrix transform, (1, 0, 1, ...) in every column; n terms of (1, 0, 1, ...) in odd rows; n terms of (0, 1, 0, ...) in even rows.

%F T(n,k) = [k<=n]*(1+(-1)^(n-k))/2. - _Paul Barry_, Sep 10 2008

%F With offset n=1, k=0: Sum_{k=0..n} {T(n,k)*x^k} = A000035(n), A004526(n+1), A000975(n), A033113(n), A033114(n), A033115(n), A033116(n), A033117(n), A033118(n), A033119(n), A056830(n+1) for x=0,1,2,3,4,5,6,7,8,9,10 respectively. - _Philippe Deléham_, Oct 17 2011

%F T(n+1,1) = 1 - T(n,1); T(n+1,k) = T(n,k-1), 1 < k <= n+1. - _Reinhard Zumkeller_, Aug 01 2014

%e First few rows of the triangle are:

%e 1;

%e 0, 1;

%e 1, 0, 1;

%e 0, 1, 0, 1;

%e 1, 0, 1, 0, 1; ...

%p A128174 := proc(n,k)

%p if k > n or k < 1 then

%p 0;

%p else

%p modp(k+n+1,2) ;

%p end if;

%p end proc: # _R. J. Mathar_, Aug 06 2016

%t a128174[r_] := Table[If[EvenQ[n+k], 1, 0], {n, 1, r}, {k, 1, n}]

%t TableForm[a128174[5]] (* triangle *)

%t Flatten[a128174[10]] (* data *) (* _Hartmut F. W. Hoft_, Mar 15 2017 *)

%t Table[(1+(-1)^(n-k))/2, {n,1,12}, {k,1,n}]//Flatten (* _G. C. Greubel_, Sep 26 2017 *)

%o (Haskell)

%o a128174 n k = a128174_tabl !! (n-1) !! (k-1)

%o a128174_row n = a128174_tabl !! (n-1)

%o a128174_tabl = iterate (\xs@(x:_) -> (1 - x) : xs) [1]

%o -- _Reinhard Zumkeller_, Aug 01 2014

%o (PARI) for(n=1,12, for(k=1,n, print1((1+(-1)^(n-k))/2, ", "))) \\ _G. C. Greubel_, Sep 26 2017

%o (Magma) [[(1+(-1)^(n-k))/2: k in [1..n]]: n in [1..12]]; // _G. C. Greubel_, Jun 05 2019

%o (Sage) [[(1+(-1)^(n-k))/2 for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Jun 05 2019

%Y Cf. A004526 (row sums).

%K nonn,easy,tabl

%O 1,1

%A _Gary W. Adamson_, Feb 17 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 April 19 02:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)