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.
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, 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, 7, 3, 14, 8, 2, 12, 8, 5, 3, 2, 2, 3, 5
Offset: 1
Examples
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. |1|2|2| initial row |3|3|3|4| |4|4|4|5| |5|5|5|5| |6|6|6|6|6| |6|_|_|_|_| last row after n=6 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.
Links
- John Tyler Rascoe, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A357261_list := proc(maxn) local A, g, c, n, r; A := []; g := 3; c := 0; for n from 1 to maxn do r := irem(n + c, g); c := r; if r = 0 then r := g; g := g + 1; fi; A := [op(A), r]; od; return A end: A357261_list(77); # Peter Luschny, Dec 21 2022
-
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
-
Python
def A357261_list(maxn): """Returns a list of the first maxn terms""" A = [] g = 3 c = 0 for n in range(1,maxn+1): if (n + c)%g == 0: A.append(g) g += 1 c = 0 else: A.append((n + c)%g) c = A[-1] return A
Comments