login
A395531
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
1, 3, 7, 11, 16, 25, 32, 40, 49, 59, 73, 85, 98, 112, 127, 147, 164, 182, 201, 221, 242, 272, 295, 319, 344, 370, 397, 425, 454, 484, 515, 553, 586, 620, 655, 691, 728, 766, 805, 852, 893, 935, 978, 1022, 1067, 1113, 1160, 1208, 1265, 1315, 1366, 1418, 1471, 1525, 1580, 1636, 1693
OFFSET
1,2
COMMENTS
Positions of 0's in A233380. - Rémy Sigrist, Apr 30 2026
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
LINKS
Aleksei Udovenko, Optimized C++ program
EXAMPLE
After 11 bricks have been placed, the wall looks like this (with A for block 10 and B for block 11):
BBBBBBBBBBB---------
7777777AAAAAAAAAA---
333666666999999999--
12244445555588888888
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.
PROG
(Python)
from itertools import count
def a(): # Generator function for the sequence
rows = []
height = 0
for n in count(1):
if height==0 or n <= rows[height-1]:
yield n
height += 1
rows.append(n)
else:
for i in range(height-1, -1, -1):
if i==0 or rows[i] + n <= rows[i-1]:
rows[i] += n
break
CROSSREFS
Cf. A233380.
Sequence in context: A131024 A053982 A118000 * A121640 A319258 A112786
KEYWORD
easy,nonn
AUTHOR
Christian Perfect, Apr 27 2026
STATUS
approved