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.

A106465 Triangle read by rows, T(n, k) = 1 if n mod 2 = 1, otherwise (k + 1) mod 2.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Paul Barry, May 03 2005

Keywords

Comments

Rows alternate between all 1's and alternating 1's and 0's. A 'mixed' sequence array: rows alternate between the rows of the sequence array for the all 1's sequence and the sequence array for the sequence 1,0,1,0,...
Column 2*k has g.f. x^(2*k)/(1-x); column 2*k+1 has g.f. x^(2*k+1)/(1-x^2).
Row sums are A029578(n+2). Antidiagonal sums are A106466.
This triangle is the Kronecker product of an infinite lower triangular matrix filled with 1's with a 2 X 2 lower triangular matrix of 1's. - Christopher Cormier, Sep 24 2017
From Peter Bala, Aug 21 2021: (Start)
Using the notation of Davenport et al.:
This is the double Riordan array ( 1/(1 - x); x/(1 + x), x*(1 + x) ).
The inverse array equals ( (1 - x)*(1 - x^2); x*(1 - x), x*(1 + x) ).
They are examples of double Riordan arrays of the form (g(x); x*f_1(x), x*f_2(x)), where f_1(x)*f_2(x) = 1. Arrays of this type form a group under matrix multiplication. For the group law see the Bala link. (End)

Examples

			The triangle begins:
  n\k| 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 ...
  ---+------------------------------------------------
   0 | 1
   1 | 1  1
   2 | 1  0  1
   3 | 1  1  1  1
   4 | 1  0  1  0  1
   5 | 1  1  1  1  1  1
   6 | 1  0  1  0  1  0  1
   7 | 1  1  1  1  1  1  1  1
   8 | 1  0  1  0  1  0  1  0  1
   9 | 1  1  1  1  1  1  1  1  1  1
  10 | 1  0  1  0  1  0  1  0  1  0  1
  11 | 1  1  1  1  1  1  1  1  1  1  1  1
  12 | 1  0  1  0  1  0  1  0  1  0  1  0  1
  13 | 1  1  1  1  1  1  1  1  1  1  1  1  1  1
  14 | 1  0  1  0  1  0  1  0  1  0  1  0  1  0  1
... Reformatted by _Wolfdieter Lang_, May 12 2018
Inverse array begins
  n\k|  0   1   2   3   4   5   6   7
  ---+-------------------------------
   0 |  1
   1 | -1   1
   2 | -1   0   1
   3 |  1  -1  -1   1
   4 |  0   0  -1   0   1
   5 |  0   0   1  -1  -1   1
   6 |  0   0   0   0  -1   0   1
   7 |  0   0   0   0   1  -1  -1  1
  ... - _Peter Bala_, Aug 21 2021
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> if igcd(n - k + 1, k + 1) mod 2 = 0 then 0 else 1 fi:
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Alternative:
    T := (n, k) -> if n mod 2 = 1 then 1 else (k + 1) mod 2 fi:
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od; # Peter Luschny, Dec 12 2022
  • Mathematica
    Table[Binomial[Mod[n, 2], Mod[k, 2]], {n, 0, 16}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 12 2022 *)
  • Python
    def A106465row(n: int) -> list[int]:
      if n % 2 == 1:
          return [1] * (n + 1)
      return [1, 0] * (n // 2) + [1]
    for n in range(9): print(A106465row(n)) # Peter Luschny, Dec 12 2022

Formula

If gcd(n - k + 1, k + 1) mod 2 = 0 then T(n, k) = 0, otherwise T(n, k) = 1.
T(n, k) = A003989(n + 1, k + 1) mod 2.
T(n, k) = binomial(n mod 2, k mod 2). - Peter Luschny, Dec 12 2022

Extensions

Edited and new name by Peter Luschny, Dec 12 2022