login
a(n) is the number of blocks in the bottom row after adding n blocks to the preceding structure of rows. See Comments and Example sections for more details.
2

%I #75 Jul 22 2023 21:03:10

%S 1,3,3,3,4,1,3,1,5,4,3,3,4,6,1,3,6,3,1,7,5,3,2,2,3,5,8,1,3,6,1,6,3,1,

%T 9,6,3,1,10,7,4,2,1,1,2,4,7,11,1,3,6,10,3,9,4,12,5,11,5,13,5,11,4,12,

%U 7,3,14,8,2,12,8,5,3,2,2,3,5

%N a(n) is the number of blocks in the bottom row after adding n blocks to the preceding structure of rows. See Comments and Example sections for more details.

%C A structure of rows is built up successively where each n blocks are added onto the preceding structure. The first row has an initial width of 3. After n = 1, n blocks are first added filling in the last row where n - 1 left off.

%C Once a row is filled a new row is started below it. After adding n blocks, if the final row reached is filled exactly, then the width of the next row is increased by one. Otherwise the width of the next row is the same as the previous.

%C Assuming the rows are built according to the given algorithm, a(n) is the number of blocks tagged 'n' in the last row that includes a block tagged 'n'." - _Peter Luschny_, Dec 20 2022

%C Will this sequence ever reach a point after which a(n) grows linearly? This is the case using an initial width of 2 instead of 3.

%H John Tyler Rascoe, <a href="/A357261/b357261.txt">Table of n, a(n) for n = 1..10000</a>

%e After blocks 1 and 2, the initial row width 3 is exactly filled and hence the next row (of 3's and 4) is 1 longer.

%e |1|2|2| initial row

%e |3|3|3|4|

%e |4|4|4|5|

%e |5|5|5|5|

%e |6|6|6|6|6|

%e |6|_|_|_|_| last row after n=6

%e For n=6, the structure after blocks 1 through 6 have been added is as shown above and its final row has just one block (one 6) so that a(6) = 1.

%p A357261_list := proc(maxn) local A, g, c, n, r;

%p A := []; g := 3; c := 0;

%p for n from 1 to maxn do

%p r := irem(n + c, g);

%p c := r;

%p if r = 0 then

%p r := g; g := g + 1;

%p fi;

%p A := [op(A), r];

%p od; return A end:

%p A357261_list(77); # _Peter Luschny_, Dec 21 2022

%o (Python)

%o def A357261_list(maxn):

%o """Returns a list of the first maxn terms"""

%o A = []

%o g = 3

%o c = 0

%o for n in range(1,maxn+1):

%o if (n + c)%g == 0:

%o A.append(g)

%o g += 1

%o c = 0

%o else:

%o A.append((n + c)%g)

%o c = A[-1]

%o return A

%o (PARI) lista(nn) = my(nbc=3, col=0, list=List()); for (n=1, nn, col = lift(Mod(col+n, nbc)); listput(list, if (col, col, nbc)); if (!col, nbc++);); Vec(list); \\ _Michel Marcus_, Oct 17 2022

%Y Cf. A002024, A057176, A064434, A096535, A104647, A275204.

%K nonn,look,easy

%O 1,2

%A _John Tyler Rascoe_, Oct 08 2022