This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A357261 #75 Jul 22 2023 21:03:10 %S A357261 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 A357261 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 A357261 7,3,14,8,2,12,8,5,3,2,2,3,5 %N A357261 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 A357261 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 A357261 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 A357261 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 A357261 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 A357261 John Tyler Rascoe, <a href="/A357261/b357261.txt">Table of n, a(n) for n = 1..10000</a> %e A357261 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 A357261 |1|2|2| initial row %e A357261 |3|3|3|4| %e A357261 |4|4|4|5| %e A357261 |5|5|5|5| %e A357261 |6|6|6|6|6| %e A357261 |6|_|_|_|_| last row after n=6 %e A357261 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 A357261_list := proc(maxn) local A, g, c, n, r; %p A357261 A := []; g := 3; c := 0; %p A357261 for n from 1 to maxn do %p A357261 r := irem(n + c, g); %p A357261 c := r; %p A357261 if r = 0 then %p A357261 r := g; g := g + 1; %p A357261 fi; %p A357261 A := [op(A), r]; %p A357261 od; return A end: %p A357261 A357261_list(77); # _Peter Luschny_, Dec 21 2022 %o A357261 (Python) %o A357261 def A357261_list(maxn): %o A357261 """Returns a list of the first maxn terms""" %o A357261 A = [] %o A357261 g = 3 %o A357261 c = 0 %o A357261 for n in range(1,maxn+1): %o A357261 if (n + c)%g == 0: %o A357261 A.append(g) %o A357261 g += 1 %o A357261 c = 0 %o A357261 else: %o A357261 A.append((n + c)%g) %o A357261 c = A[-1] %o A357261 return A %o A357261 (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 A357261 Cf. A002024, A057176, A064434, A096535, A104647, A275204. %K A357261 nonn,look,easy %O A357261 1,2 %A A357261 _John Tyler Rascoe_, Oct 08 2022