Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #31 Jan 13 2023 18:59:09
%S 1,2,3,3,4,6,4,3,3,4,6,9,13,6,21,16,33,15,34,18,3,25,12,36,25,51,18,
%T 46,15,45,16,48,21,55,30,6,43,21,60,40,81,24,67,12,57,4,51,99,49,99,3,
%U 55,108,15,70,126,36,94,6,66,127,42,105,22,87,6,73,141,63
%N a(n) is the row position of the n-th number n after adding the number n, n times to the preceding triangle. A variant of A357261, see Comments and Examples for more details.
%C A triangle is built up successively where n appears n times within the triangle. Each row has a set width before n is added, and the first row begins with a width of 1.
%C Numbers n are added to the first open position within the triangle or where the previous n left off so that no gaps are left in the rows of the triangle. If the row position of the n-th number n placed is the rightmost position within that row, then the width of the next row is increased by n. Otherwise, the width of the next row stays the same as the previous one.
%C The next row's width can only increase after a given n is added all n times. So when a row is filled after adding fewer than n n's, the next row, by definition, will have the same width.
%H John Tyler Rascoe, <a href="/A358073/b358073.txt">Table of n, a(n) for n = 1..10000</a>
%H John Tyler Rascoe, <a href="/A358073/a358073.png">Scatterplot of a(n) for n = 1...50000</a>
%e After 5 is added 5 times, the fifth 5 falls in the rightmost row position. So the width of the next row is increased by 5.
%e |1| initial row
%e |2|2|
%e |3|3|3|4|
%e |4|4|4|5|
%e |5|5|5|5|
%e |6|6|6|6|6|6|7|7|7|
%e |7|7|7|7|_|_|_|_|_|
%e a(7) = 4 because the row position of the seventh 7 added is 4.
%p A358073_list := proc(maxn) local A, g, c, n, r;
%p A := []; g := 1; 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;
%p g := g + n;
%p fi;
%p A := [op(A), r];
%p od; return A end:
%p A358073_list(69); # _Peter Luschny_, Dec 21 2022
%o (Python)
%o def A358073_list(maxn):
%o """Returns a list of the first maxn terms"""
%o A = []
%o g = 1
%o c = 0
%o for n in range(1,maxn+1):
%o if (n + c)%g ==0:
%o A.append(g)
%o g += n
%o c = 0
%o else:
%o A.append((n + c)%g)
%o c = A[-1]
%o return A
%Y Cf. A002024, A057176, A064434, A096535, A104647, A275204, A357261.
%K nonn,easy,look
%O 1,2
%A _John Tyler Rascoe_, Oct 29 2022