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.

A253146 A fractal tree, read by rows: for n > 2, T(n,1) = T(n-1,1)+2, T(n,n) = T(n-1,1)+3, and for k=2..n-1, T(n,k) = T(n-2,k-1).

Original entry on oeis.org

1, 2, 3, 4, 1, 5, 6, 2, 3, 7, 8, 4, 1, 5, 9, 10, 6, 2, 3, 7, 11, 12, 8, 4, 1, 5, 9, 13, 14, 10, 6, 2, 3, 7, 11, 15, 16, 12, 8, 4, 1, 5, 9, 13, 17, 18, 14, 10, 6, 2, 3, 7, 11, 15, 19, 20, 16, 12, 8, 4, 1, 5, 9, 13, 17, 21, 22, 18, 14, 10, 6, 2, 3, 7, 11, 15, 19, 23
Offset: 1

Views

Author

Keywords

Comments

Eric Angelini's original posting to the Sequence Fans mailing list gave a similar but different lovely sequence, which is now A253028. - N. J. A. Sloane, Jan 04 2015, and Felix Fröhlich, May 23 2016
It appears that:
1) partial sums of terms, situated on the outer leftmost leftwise triangle diagonal are equal to A002061(k), k>=1;
2) partial sums of terms, situated on the second (from the left) leftwise triangle diagonal represent recurrence a(k+1) = ((k-1)*a(k))/(k-3)-(2*(k+3))/(k-3), k>=3
3) partial sums of terms, situated on the outer rightmost rightwise triangle diagonal are equal to A000290(k)=k^2, k>=1. - Alexander R. Povolotsky, Dec 28 2014

Examples

			.   1:                         1
.   2:                       2   3
.   3:                     4   1   5
.   4:                   6   2   3   7
.   5:                 8   4   1   5   9
.   6:              10   6   2   3   7  11
.   7:            12   8   4   1   5   9  13
.   8:          14  10   6   2   3   7  11  15
.   9:        16  12   8   4   1   5   9  13  17
.  10:      18  14  10   6   2   3   7  11  15  19
.  11:    20  16  12   8   4   1   5   9  13  17  21
.  12:  22  18  14  10   6   2   3   7  11  15  19  23 .
Removing the first and last entries from each row gives the same tree back again.
		

Crossrefs

Cf. A253028. Row sums appear to be A035608.

Programs

  • Haskell
    a253146 n k = a253146_tabl !! (n-1) !! (k-1)
    a253146_row n = a253146_tabl !! (n-1)
    a253146_tabl = [1] : [2,3] : f [1] [2,3] where
       f us vs@(v:_) = ws : f vs ws where
                       ws = [v + 2] ++ us ++ [v + 3]
  • Mathematica
    T[n_, 1] := 2n - 2;
    T[n_, n_] := 2n - 1;
    T[n_, k_] := T[n, k] = T[n-2, k-1];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 20 2021 *)