login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle read by rows: zeroth row is 0; to get row n >= 1, append next 2^n numbers to end of previous row.
1

%I #14 Jan 20 2021 12:40:20

%S 0,0,1,2,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,0,1,2,3,4,5,

%T 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,

%U 30,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22

%N Triangle read by rows: zeroth row is 0; to get row n >= 1, append next 2^n numbers to end of previous row.

%H Robert Israel, <a href="/A115218/b115218.txt">Table of n, a(n) for n = 0..10000</a>

%F From _Robert Israel_, Jan 02 2018: (Start)

%F G.f.: x^2/(1-x)^2 - (1-x)^(-1)*Sum_{n>=2} (2^n-1)*x^(2^(n+1)-n-2).

%F a(n) = k if n = 2^m - m + k - 1, 0 <= k <= 2^m-2.

%F G.f. as triangle: (1-y)^(-2)*Sum_{n>=1} x^n*(y + (1-2^n)*y^(2^n-1)+(2^n-2)*y^(2^n)). (End)

%e Triangle begins:

%e 0

%e 0 1 2

%e 0 1 2 3 4 5 6

%e 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

%e ...

%p seq($0..2^n-2, n=0..5); # _Robert Israel_, Jan 02 2018

%t Range[0,#-1]&/@Accumulate[2^Range[0,5]]//Flatten (* _Harvey P. Dale_, Jan 20 2021 *)

%Y Cf. A126646 (length of n-th row).

%K nonn,tabf

%O 0,4

%A _N. J. A. Sloane_, based on a suggestion from _Harrie Grondijs_, Mar 04 2006