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, Table of n, a(n) for n = 1..10000
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
KEYWORD
easy,nonn
AUTHOR
Christian Perfect, Apr 27 2026
STATUS
approved
