login
Lay down bricks of length 1, 2, 3, ... on the top-right quadrant of the x-y plane. Place a brick as close to x=0 as possible, and on the highest row with bricks directly underneath where the new brick does not overhang. a(n) is the length of the leftmost brick on each row.
1

%I #30 May 11 2026 22:51:08

%S 1,3,7,11,16,25,32,40,49,59,73,85,98,112,127,147,164,182,201,221,242,

%T 272,295,319,344,370,397,425,454,484,515,553,586,620,655,691,728,766,

%U 805,852,893,935,978,1022,1067,1113,1160,1208,1265,1315,1366,1418,1471,1525,1580,1636,1693

%N Lay down bricks of length 1, 2, 3, ... on the top-right quadrant of the x-y plane. Place a brick as close to x=0 as possible, and on the highest row with bricks directly underneath where the new brick does not overhang. a(n) is the length of the leftmost brick on each row.

%C Positions of 0's in A233380. - _Rémy Sigrist_, Apr 30 2026

%C Conjecture: when n = a(m) for some m, we have a(n) = n(n+3)/2 - m. Verified experimentally up to m=1172, n=688491. - _Aleksei Udovenko_, May 07 2026

%H Aleksei Udovenko, <a href="/A395531/b395531.txt">Table of n, a(n) for n = 1..10000</a>

%H Aleksei Udovenko, <a href="/A395531/a395531.cpp.txt">Optimized C++ program</a>

%e After 11 bricks have been placed, the wall looks like this (with A for block 10 and B for block 11):

%e BBBBBBBBBBB---------

%e 7777777AAAAAAAAAA---

%e 333666666999999999--

%e 12244445555588888888

%e The next brick, 12 units long, has to go on the bottom row because on any other row it would have to overhang the row below.

%o (Python)

%o from itertools import count

%o def a(): # Generator function for the sequence

%o rows = []

%o height = 0

%o for n in count(1):

%o if height==0 or n <= rows[height-1]:

%o yield n

%o height += 1

%o rows.append(n)

%o else:

%o for i in range(height-1,-1,-1):

%o if i==0 or rows[i] + n <= rows[i-1]:

%o rows[i] += n

%o break

%Y Cf. A233380.

%K easy,nonn

%O 1,2

%A _Christian Perfect_, Apr 27 2026