login
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

%I #58 Jan 05 2022 05:20:34

%S 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,

%T 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,

%U 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

%N 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).

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

%H John-Vincent Saddic, <a href="/A345236/a345236.java.txt">Java code to print the n-th row of the triangle</a>

%F To calculate the values of the n-th row:

%F c(m) = floor((sqrt(9 + 8*m) - 3)/2) = A052146(m+1).

%F r(m) = m - (c(m)^2)/2 - 3*c(m)/2 = A002262(m+1).

%F 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.

%e Triangle begins as:

%e 0

%e 1

%e 1 0

%e 1 1

%e 1 2

%e 1 0 0

%e 1 0 1

%e 1 0 2

%e 1 0 3

%e 1 1 0

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

%Y Cf. A002262, A052146.

%Y First row with n values: A006893(n).

%K nonn,tabf

%O 0,8

%A _John-Vincent Saddic_, Jul 14 2021