login
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).
1
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,8
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.
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.
EXAMPLE
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
PROG
(Java) See Links. Rows are printed with values concatenated. Values greater than 10 are represented between parentheses, e.g., row 100 is 113(10).
CROSSREFS
First row with n values: A006893(n).
Sequence in context: A127587 A175832 A330961 * A321223 A082926 A060564
KEYWORD
nonn,tabf
AUTHOR
John-Vincent Saddic, Jul 14 2021
STATUS
approved