cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 59 results. Next

A134511 abs(A049310) * A128174 provided both arrays are read with offset (n,k) = (0,0).

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 0, 3, 0, 1, 5, 0, 4, 0, 1, 0, 8, 0, 5, 0, 1, 13, 0, 12, 0, 6, 0, 1, 0, 21, 0, 17, 0, 7, 0, 1, 34, 0, 33, 0, 23, 0, 8, 0, 1, 0, 55, 0, 50, 0, 30, 0, 9, 0, 1, 89, 0, 88, 0, 73, 0, 38, 0, 10, 0, 1, 0, 144, 0, 138, 0, 103, 0, 47, 0, 11, 0, 1, 233, 0, 232, 0, 211, 0, 141, 0, 57, 0, 12, 0, 1
Offset: 0

Views

Author

Gary W. Adamson, Oct 28 2007

Keywords

Comments

A112552(unsigned) = A128174 * A049310.
Row sums = A134512: (1, 1, 3, 4, 10, 14, 32, 46, 99, 145, ...).
From Petros Hadjicostas, Sep 03 2019: (Start)
To prove Alois P. Heinz's claim (see the Formula section and his Maple program below) we note that, for n >= 0 and 0 <= k <= n, T(n, n-k) = Sum_{r = 0 .. infinity} abs(A049310(n,r)) * A128174(r,n-k) = Sum_{r = n-k..n} abs(A049310(n,r)) * A128174(r,n-k). But A049310(n,r) = 0 when n + r is odd and A128174(r,n-k) = 1 iff r + n - k is even. Thus, when k is odd, T(n, n-k) = 0.
Assume now k is even. Then T(n, n-k) = Sum_{r = n-k..n and n+r even} abs(A049310(n,r)) = Sum_{r = n-k..n and n+r even} binomial((n+r)/2, r). Letting m = n-r (which is even), we see that the summation ranges from m = 0 to k over even numbers. Thus, let s = m/2, and so T(n, n-k) = Sum_{s = 0 .. k/2} binomial(n-s, n-2*s) = Sum_{s = 0 .. k/2} binomial(n-s, s) = F(n+1, k/2), where F(.,.) is the incomplete Fibonacci number from the references (see also the Formula section below).
(End)

Examples

			First few rows of the triangle T(n,k):
   1;
   0,  1;
   2,  0,  1;
   0,  3,  0,  1;
   5,  0,  4,  0,  1;
   0,  8,  0,  5,  0,  1;
  13,  0, 12,  0,  6,  0,  1;
   0, 21,  0, 17,  0,  7,  0,  1;
  34,  0, 33,  0, 23,  0,  8,  0,  1;
   0, 55,  0, 50,  0, 30,  0,  9,  0,  1;
  ...
		

Crossrefs

A(4n,2n) gives: A038736.

Programs

  • Maple
    N:= 20: # for the first N rows
    T128174:= Matrix(N,N,(i,j) -> `if`(j<=i, (i-j+1) mod 2, 0)):
    T049310:= Matrix(N,N):
    for i from 1 to N do
         P:= orthopoly[U](i-1,x/2);
         for j from 1 to i do
           T049310[i,j]:= abs(coeff(P,x,j-1))
         od
    od:
    A:= T049310 . T128174:
    for i from 1 to N do
    convert(A[i,1..i],list)
    od;  # Robert Israel, Mar 02 2018
    # second Maple program:
    T:= (n, k)-> `if`((n+k)::odd, 0, add(binomial(n-s, s), s=0..(n-k)/2)):
    seq(seq(T(n, k), k=0..n), n=0..12); # Alois P. Heinz, Sep 02 2019
  • Mathematica
    T[n_, k_] := If[OddQ[n+k], 0, Sum[Binomial[n-s, s], {s, 0, (n-k)/2}]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 31 2021, after Alois P. Heinz *)

Formula

abs(A049310) * A128174 as infinite lower triangular matrices assuming both of them have offset (n,k) = (0,0).
From Petros Hadjicostas, Sep 03 2019: (Start)
Let F(m,r) = Sum_{j = 0..r} binomial(m-1-j, j) be the incomplete Fibonacci numbers from the references (defined for m >= 1 and 0 <= r <= floor((m-1)/2)).
As Alois P. Heinz observed, for n >= 0 and 0 <= k <= n, T(n, n-k) = F(n+1, k/2) when k is even, and = 0 otherwise (see his Maple program below).
(End)

Extensions

Edited by Robert Israel, Mar 02 2018

A128175 Binomial transform of A128174.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 4, 3, 1, 8, 8, 7, 4, 1, 16, 16, 15, 11, 5, 1, 32, 32, 31, 26, 16, 6, 1, 64, 64, 63, 57, 42, 22, 7, 1, 128, 128, 127, 120, 99, 64, 29, 8, 1, 256, 256, 255, 247, 219, 163, 93, 37, 9, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 17 2007

Keywords

Comments

Row sums = A045623: (1, 2, 5, 12, 28, 64, 144, ...).
Riordan array ((1-x)/(1-2x),x/(1-x)). - Paul Barry, Oct 02 2010
Fusion of polynomial sequences p(n,x) = (x+1)^n and q(n,x) = x^n + x^(n-1) + ... + x + 1; see A193722 for the definition of fusion. - Clark Kimberling, Aug 04 2011

Examples

			First few rows of the triangle:
   1;
   1,  1;
   2,  2,  1;
   4,  4,  3,  1;
   8,  8,  7,  4,  1;
  16, 16, 15, 11,  5,  1;
  32, 32, 31, 26, 16,  6,  1;
  64, 64, 63, 57, 42, 22,  7,  1;
  ...
From _Paul Barry_, Oct 02 2010: (Start)
Production matrix is
  1, 1;
  1, 1, 1;
  0, 0, 1, 1;
  0, 0, 0, 1, 1;
  0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 1, 1;
  ...
Matrix logarithm is
  0;
  1, 0;
  1, 2, 0;
  1, 1, 3, 0;
  1, 1, 1, 4, 0;
  1, 1, 1, 1, 5, 0;
  1, 1, 1, 1, 1, 6, 0;
  1, 1, 1, 1, 1, 1, 7, 0;
  1, 1, 1, 1, 1, 1, 1, 8, 0;
  1, 1, 1, 1, 1, 1, 1, 1, 9,  0;
  1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 0;
  ... (End)
.
First few rows of the array:
  1, 1,  2,  4,  8,  16, ...
  1, 2,  4,  8, 16,  32, ...
  1, 3,  7, 15, 31,  63, ...
  1, 4, 11, 26, 57, 120, ...
  1, 5, 16, 42, 99, 219, ...
  ...
		

Crossrefs

Programs

  • Maple
    A193820 := (n,k) -> `if`(k=0 or n=0, 1, A193820(n-1,k-1)+A193820(n-1,k));
    A128175 := (n,k) -> A193820(n-1,n-k);
    seq(print(seq(A128175(n,k),k=0..n)),n=0..10); # Peter Luschny, Jan 22 2012
  • Mathematica
    z = 10; a = 1; b = 1;
    p[n_, x_] := (a*x + b)^n
    q[0, x_] := 1
    q[n_, x_] := x*q[n - 1, x] + 1; q[n_, 0] := q[n, x] /. x -> 0;
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]   (* A193820 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]  (* A128175 *)
    (* Clark Kimberling, Aug 06 2011 *)
    (* function dotTriangle[] is defined in A128176 *)
    a128175[r_] := dotTriangle[Binomial, If[EvenQ[#1 + #2], 1, 0]&, r]
    TableForm[a128174[7]] (* triangle *)
    Flatten[a128174[9]] (* data *) (* Hartmut F. W. Hoft, Mar 15 2017 *)

Formula

A007318 * A128174 as infinite lower triangular matrices.
Antidiagonals of an array in which the first row = (1, 1, 2, 4, 8, 16, ...); and (n+1)-th row = partial sums of n-th row.
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(4 + 4*x + 3*x^2/2! + x^3/3!) = 4 + 8*x + 15*x^2/2! + 26*x^3/3! + 42*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 22 2014
T(n, k) = Sum_{i=0..floor((n-k)/2)} binomial(n-1, k-1+2*i). - Werner Schulte, Mar 05 2025
T(n, k) = binomial(n-1, k-1)*hypergeom([1, (k-n)/2, (1+k-n)/2], [(1+k)/2, k/2], 1). - Stefano Spezia, Mar 07 2025

A130125 Triangle defined by A128174 * A130123, read by rows.

Original entry on oeis.org

1, 0, 2, 1, 0, 4, 0, 2, 0, 8, 1, 0, 4, 0, 16, 0, 2, 0, 8, 0, 32, 1, 0, 4, 0, 16, 0, 64, 0, 2, 0, 8, 0, 32, 0, 128, 1, 0, 4, 0, 16, 0, 64, 0, 256, 0, 2, 0, 8, 0, 32, 0, 128, 0, 512, 1, 0, 4, 0, 16, 0, 64, 0, 256, 0, 1024, 0, 2, 0, 8, 0, 32, 0, 128, 0, 512, 0, 2048
Offset: 0

Views

Author

Gary W. Adamson, May 11 2007

Keywords

Comments

Row sums = A000975: (1, 2, 5, 10, 21, 42, ...).

Examples

			First few rows of the triangle are:
  1;
  0, 2;
  1, 0, 4;
  0, 2, 0, 8;
  1, 0, 4, 0, 16;
  0, 2, 0, 8,  0, 32; ...
		

Crossrefs

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> 2^(k-1)*(1+(-1)^(n-k)) ))); # G. C. Greubel, Jun 05 2019
  • Magma
    [[2^(k-1)*(1+(-1)^(n-k)): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Jun 05 2019
    
  • Mathematica
    Table[2^(k-1)*(1+(-1)^(n-k)), {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 05 2019 *)
  • PARI
    {T(n,k) = 2^(k-1)*(1+(-1)^(n-k))}; \\ G. C. Greubel, Jun 05 2019
    
  • Sage
    [[2^(k-1)*(1+(-1)^(n-k)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jun 05 2019
    

Formula

A128174 * A130123 as infinite lower triangular matrices. By columns, (2^k, 0, 2^k, 0, ...).
T(n,k) = 2^(k-1)*(1 + (-1)^(n-k)). - G. C. Greubel, Jun 05 2019

Extensions

More terms added by G. C. Greubel, Jun 05 2019

A128176 A128174 * A007318.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 4, 3, 1, 3, 6, 7, 4, 1, 3, 9, 13, 11, 5, 1, 4, 12, 22, 24, 16, 6, 1, 4, 16, 34, 46, 40, 22, 7, 1, 5, 20, 50, 80, 86, 62, 29, 8, 1, 5, 25, 70, 130, 166, 148, 91, 37, 9, 1, 6, 30, 95, 200, 296, 314, 239, 128, 46, 10, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 17 2007

Keywords

Comments

Row Sums = A000975: (1, 2, 5, 10, 21, 42, 85, 170, ...).
From Peter Bala, Aug 14 2014: (Start)
Riordan array ( 1/((1 - x^2)*(1 - x)), x/(1 - x) ).
Let B_n be the set of length n nonzero binary words ending in an even number (possibly 0) of 0's. Then T(n,k) is the number of words in B_n having k 1's. An example is given below. (End)

Examples

			First few rows of the triangle are:
  1;
  1,  1;
  2,  2,  1;
  2,  4,  3,  1;
  3,  6,  7,  4,  1;
  3,  9, 13, 11,  5,  1;
  4, 12, 22, 24, 16,  6,  1;
  4, 16, 34, 46, 40, 22,  7,  1;
  ...
From _Peter Bala_, Aug 14 2014: (Start)
Row 4: [2,4,3,1].
k      Binary words in B_4 with k 1's       Number
- - - - - - - - - - - - - - - - - - - - - - - - - -
1      0001, 0100                            2
2      0011, 0101, 1001, 1100                4
3      0111, 1011, 1101                      3
4      1111                                  1
- - - - - - - - - - - - - - - - - - - - - - - - - -
The infinitesimal generator matrix begins
   0
   1  0
   1  2  0
  -1  1  3  0
   1 -1  1  4  0
  -1  1 -1  1  5  0
  ...
Cf. A132440. (End)
		

Crossrefs

Cf. A035317 (mirror). [Johannes W. Meijer, Jul 20 2011]

Programs

  • Mathematica
    (* Dot product of two lower triangular matrices *)
    dotRow[r_, s_, n_] := Map[Sum[r[n, k] s[k, #], {k, #, n}]&, Range[0, n]]
    dotTriangle[r_, s_, n_] := Map[dotRow[r, s, #]&, Range[0, n]]
    (* The pure function in the first argument computes A128174 *)
    a128176[r_] := dotTriangle[If[EvenQ[#1 + #2], 1, 0]&, Binomial, r]
    TableForm[a128176[7]] (* triangle *)
    Flatten[a128176[9]] (* data *) (* Hartmut F. W. Hoft, Mar 15 2017 *)
    T[n_, n_] := 1; T[n_, 0] := 1 + Floor[n/2]; T[n_, k_] := T[n, k] = T[n - 1, k - 1] + T[n - 1, k]; Table[T[n, k], {n,0,20}, {k, 0, n}] // Flatten (* G. C. Greubel, Sep 30 2017 *)
  • PARI
    for(n=0, 10, for(k=0,n, print1(sum(i=0,floor(n/2), binomial(n - 2*i,k)), ", "))) \\ G. C. Greubel, Sep 30 2017

Formula

A128174 * A007318 (Pascal's triangle), as infinite lower triangular matrices.
From Peter Bala, Aug 14 2014: (Start)
Working with a row and column offset of 0 we have T(n,k) = Sum_{i = 0..floor(n/2)} binomial(n - 2*i,k).
O.g.f.: 1/( (1 - z^2)*(1 - z*(1 + x)) ) = Sum_{n >= 0} R(n,x)*z^n = 1 + (1 + x)*z + (2 + 2*x + x^2)*z^2 + ....
The row polynomials satisfy R(n+2,x) - R(n,x) = (1 + x)^(n+1). (End)
From Hartmut F. W. Hoft, Mar 15 2017: (Start)
Using offset 0, the triangle has the Pascal Triangle recursion pattern:
T(n, 0) = 1 + floor(n/2) and T(n, n) = 1, for n >= 0;
T(n, k) = T(n-1, k-1) + T(n-1, k) for n > 0 and 0 < k < n. (End)

A128187 Matrix product A128174 * A051731 read by rows.

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 0, 1, 0, 1, 3, 3, 1, 1, 0, 1, 4, 0, 1, 0, 1, 0, 1, 4, 4, 1, 2, 0, 1, 0, 1, 5, 0, 2, 0, 1, 0, 1, 0, 1, 5, 5, 1, 2, 1, 1, 0, 1, 0, 1, 6, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 6, 6, 2, 3, 1, 2, 0, 1, 0, 1, 0, 1, 7, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 7, 7, 2, 3, 1, 2, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 07 2007

Keywords

Examples

			First few rows of the triangle are:
1;
1, 1;
2, 0, 1;
2, 2, 0, 1;
3, 0, 1, 0, 1;
3, 3, 1, 1, 0, 1;
4, 0, 1, 0, 1, 0, 1;
4, 4, 1, 2, 0, 1, 0, 1;
...
		

Crossrefs

Cf. A128188 (row sums), A128174, A051731.

Programs

Formula

A128174 * A051731 as infinite lower triangular matrices.

A128222 A127701 * A128174.

Original entry on oeis.org

1, 1, 2, 3, 1, 3, 1, 4, 1, 4, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10
Offset: 1

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Row sums = A128223: (1, 3, 7, 10, 17, 21, 31, 36, ...).

Examples

			First few rows of the triangle:
  1;
  1, 2;
  3, 1, 3;
  1, 4, 1, 4;
  5, 1, 5, 1, 5;
  1, 6, 1, 6, 1, 6;
  7, 1, 7, 1, 7, 1, 7;
  ...
		

Crossrefs

Programs

  • Mathematica
    a128222[n_, k_] := If[EvenQ[n-k], n, 1]/;1<=k<=n
    a128222[r_] := Table[a128222[n, k], {n, 1, r}, {k, 1, n}]
    TableForm[a128222[7]] (* triangle *)
    Flatten[a128222[10]] (* data *) (* Hartmut F. W. Hoft, Mar 08 2017 *)

Formula

A127701 * A128174 as infinite lower triangular matrices. Odd rows: n terms of n, 1, n, ...; even rows: n terms of 1, n, 1, ...

Extensions

Inserted omitted values a(28) = 7 and a(29) = 1, Hartmut F. W. Hoft, Mar 08 2017

A128619 Triangle T(n, k) = A127647(n,k) * A128174(n,k), read by rows.

Original entry on oeis.org

1, 0, 1, 2, 0, 2, 0, 3, 0, 3, 5, 0, 5, 0, 5, 0, 8, 0, 8, 0, 8, 13, 0, 13, 0, 13, 0, 13, 0, 21, 0, 21, 0, 21, 0, 21, 34, 0, 34, 0, 34, 0, 34, 0, 34, 0, 55, 0, 55, 0, 55, 0, 55, 0, 55
Offset: 1

Views

Author

Gary W. Adamson, Mar 14 2007

Keywords

Comments

This triangle is different from A128618, which is equal to A128174 * A127647.

Examples

			First few rows of the triangle are:
   1;
   0,  1;
   2,  0,  2;
   0,  3,  0,  3;
   5,  0,  5,  0,  5;
   0,  8,  0,  8,  0,  8;
  13,  0, 13,  0, 13,  0, 13;
   0, 21,  0, 21,  0, 21,  0, 21,
  ...
		

Crossrefs

Programs

  • Magma
    [((n+k+1) mod 2)*Fibonacci(n): k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 17 2024
    
  • Mathematica
    Table[Fibonacci[n]*Mod[n+k+1,2], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Mar 16 2024 *)
  • SageMath
    flatten([[((n+k+1)%2)*fibonacci(n) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 17 2024

Formula

T(n, k) = A127647 * A128174, an infinite lower triangular matrix. In odd rows, n terms of F(n), 0, F(n),...; in the n-th row. In even rows, n terms of 0, F(n), 0,...; in the n-th row.
Sum_{k=1..n} T(n, k) = A128620(n-1).
From G. C. Greubel, Mar 16 2024: (Start)
T(n, k) = Fibonacci(n)*(1 + (-1)^(n+k))/2.
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^n*A128620(n-1).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = (1/2)*(1-(-1)^n)*A096140(floor((n + 1)/2)).
Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1, k) = (1/2)*(1 - (-1)^n)*( Fibonacci(n-1) + (-1)^floor((n-1)/2) * Fibonacci(floor((n-3)/2)) ). (End)

A128621 A127648 * A128174 as an infinite lower triangular matrix.

Original entry on oeis.org

1, 0, 2, 3, 0, 3, 0, 4, 0, 4, 5, 0, 5, 0, 5, 0, 6, 0, 6, 0, 6, 7, 0, 7, 0, 7, 0, 7, 0, 8, 0, 8, 0, 8, 0, 8, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13
Offset: 1

Views

Author

Gary W. Adamson, Mar 14 2007

Keywords

Examples

			First few rows of the triangle:
  1;
  0, 2;
  3, 0, 3;
  0, 4, 0, 4;
  5, 0, 5, 0, 5;
  ...
		

Crossrefs

Cf. A093005 (row sums).

Programs

  • Magma
    [n*(1+(-1)^(n+k))/2: k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 13 2024
    
  • Mathematica
    Table[n*(1+(-1)^(n+k))/2, {n,15}, {k,n}]//Flatten (* G. C. Greubel, Mar 13 2024 *)
  • SageMath
    flatten([[n*(1+(-1)^(n+k))//2 for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 13 2024

Formula

Odd rows: n terms of n, 0, n, ...; even rows, n terms of 0, n, 0, ...
T(n,k) = n if n+k even, T(n,k) = 0 if n+k odd.
Sum_{k=1..n} T(n, k) = A093005(n) (row sums).
From G. C. Greubel, Mar 13 2024: (Start)
T(n, k) = n*(1 + (-1)^(n+k))/2.
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n+1)*A093005(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = (1/2)*(1-(-1)^n) * A000326(floor((n+1)/2)).
Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1, k) = (1/2)*(1 - (-1)^n)*A123684(floor((n+1)/2)). (End)

Extensions

More terms added by G. C. Greubel, Mar 13 2024

A131406 3*A128174 - 2*A000012(signed).

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1
Offset: 1

Views

Author

Gary W. Adamson, Jul 07 2007

Keywords

Comments

Row sums = A032766, congruent to {0,1} mod 3: (1, 3, 4, 6, 7, 9, 10,...).
Sequence array for the expansion of (1+2x)/(1-x^2). A105476 is an eigensequence. [From Paul Barry, Nov 03 2010]

Examples

			First few rows of the triangle are:
1;
2, 1;
1, 2, 1;
2, 1, 2, 1;
1, 2, 1, 2, 1;
2, 1, 2, 1, 2, 1;
...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Mod[n-k, 2]+1; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 17 2016 *)

Formula

3*A128174 - 2*A000012(signed + - + 1 by columns). (1, 2, 1, 2, 1,...) in every column.
Triangle T(n,k)=if(k<=n,(3-(-1)^(n-k))/2). [From Paul Barry, Nov 03 2010]

A135839 Triangle read by rows: starting with A128174, replace left border with (1, 1, 1, ...).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 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
Offset: 1

Views

Author

Gary W. Adamson, Dec 01 2007

Keywords

Comments

Row sums = (1, 2, 2, 3, 3, 4, 4, 5, 5, ...).

Examples

			First few rows of the triangle are:
  1;
  1, 1;
  1, 0, 1;
  1, 1, 0, 1;
  1, 0, 1, 0, 1;
  1, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1;
  ...
		

Programs

  • Mathematica
    T[1, 1] := 1; T[n_, 1] := 1; T[n_, n_] := 1; T[n_, k_] := (1 - (-1)^(n - k + 1))/2; Table[T[n, k], {n, 1, 10}, {k, 1, n}]//Flatten (* G. C. Greubel, Dec 05 2016 *)
    Flatten[Table[Join[{1},PadLeft[{},n,{0,1}]],{n,0,20}]] (* Harvey P. Dale, Feb 26 2024 *)

Formula

Given A128174, replace left border with (1, 1, 1, ...). Triangle read by rows, odd rows = n terms of (1, 0, 1, ...); even rows = n terms of (1, 1, 0, 1, 0, 1, ...). By columns, leftmost column = (1, 1, 1, ...); all others = (1, 0, 1, 0, 1, ...).
T(n,1) = T(n,n) = 1, T(n,k) = (1 - (-1)^(n-k-1))/2. - G. C. Greubel,Dec 05 2016

Extensions

Definition corrected by Zhuorui He, Jul 21 2025
Showing 1-10 of 59 results. Next