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.

A355604 Table T(n, k), n >= 0, k = 0..n, read by rows; row n is obtained by replacing in row n of Pascal's triangle (A007318) runs of k consecutive even numbers by the terms of row k+1 of the present triangle.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 5, 1, 1, 1, 15, 1, 15, 1, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 1, 1, 15, 1, 15, 1, 1, 1, 1, 9, 1, 5, 1, 1, 5, 1, 9, 1, 1, 1, 45, 1, 1, 1, 1, 1, 45, 1, 1, 1, 11, 55, 165, 1, 3, 3, 1, 165, 55, 11, 1, 1, 1, 1, 1, 495, 1, 1, 1, 495, 1, 1, 1, 1
Offset: 0

Views

Author

Rémy Sigrist, Jul 09 2022

Keywords

Comments

This triangle has fractal features: even terms of Pascal's triangle are clustered as wXwXw subtriangles; these subtriangles are replaced by the first w rows (flipped upside-down) of the present triangle.

Examples

			Triangle T(n, k) begins (stars indicate replacements):
  n\k|   0    1    2    3    4    5    6    7    8    9   10   11   12
  ---+-----------------------------------------------------------------
    0|   1
    1|   1    1
    2|   1    1*   1
    3|   1    3    3    1
    4|   1    1*   1*   1*   1
    5|   1    5    1*   1*   5    1
    6|   1    1*  15    1*  15    1*   1
    7|   1    7   21   35   35   21    7    1
    8|   1    1*   1*  15*   1*  15*   1*   1*   1
    9|   1    9    1*   5*   1*   1*   5*   1*   9    1
   10|   1    1*  45    1*   1*   1*   1*   1*  45    1*   1
   11|   1   11   55  165    1*   3*   3*   1* 165   55   11    1
   12|   1    1*   1*   1* 495    1*   1*   1* 495    1*   1*   1*   1
		

Crossrefs

Programs

  • PARI
    row(n) = { my (r=binomial(n)); for (i=1, #r, if (r[i]%2==0, for (w=1, oo, if (r[i+w]%2==1, my (t=row(w-1)); for (j=1, #t, r[i-1+j]=t[j]); i+=w; break)))); return (r) }