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.

A345236 Triangle read by rows: The rightmost column contains the terms of A002262 starting at A002262(1). Each time a column's value is zero (except for a(0)), the column to its left starts at the next term in A002262, or if that column does not yet exist, it starts at A002262(2).

Original entry on oeis.org

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

Views

Author

John-Vincent Saddic, Jul 14 2021

Keywords

Comments

The first row with k columns is the A006893(k)-th. The last row with k columns comprises the first k terms of A006893.

Examples

			Triangle begins as:
  0
  1
  1 0
  1 1
  1 2
  1 0 0
  1 0 1
  1 0 2
  1 0 3
  1 1 0
		

Crossrefs

First row with n values: A006893(n).

Programs

  • Java
    See Links. Rows are printed with values concatenated. Values greater than 10 are represented between parentheses, e.g., row 100 is 113(10).

Formula

To calculate the values of the n-th row:
c(m) = floor((sqrt(9 + 8*m) - 3)/2) = A052146(m+1).
r(m) = m - (c(m)^2)/2 - 3*c(m)/2 = A002262(m+1).
The last value of row m is r(m), the second to last value is r(c(m)), the third to last value is r(c(c(m))), and so on until c(m) equals 0.