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 A080237 #37 Jan 12 2024 10:00:42 %S A080237 1,1,2,1,2,1,2,3,1,2,1,2,3,1,2,1,2,3,1,2,3,4,1,2,1,2,3,1,2,1,2,3,1,2, %T A080237 3,4,1,2,1,2,3,1,2,1,2,3,1,2,3,4,1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,1,2, %U A080237 3,1,2,1,2,3,1,2,3,4,1,2,1,2,3,1,2,1,2 %N A080237 Start with 1 and apply the process: k-th run is 1, 2, 3, ..., a(k-1)+1. %C A080237 Also a triangle collected from the Catalan generating tree, with row n containing A000108(n) terms and ending with n. Rows converge towards A007001, the "last" row. - _Antti Karttunen_, Jun 17 2003 %H A080237 Reinhard Zumkeller, <a href="/A080237/b080237.txt">Rows n = 1..10 of triangle, flattened</a> %H A080237 C. Banderier, A. Denise, P. Flajolet, M. Bousquet-Mélou et al., <a href="http://algo.inria.fr/banderier/Papers/DiscMath99.ps">Generating Functions for Generating Trees</a>, Discrete Mathematics 246(1-3), March 2002, pp. 29-55. %H A080237 Antti Karttunen, <a href="/A080237/a080237tree.txt">Notes concerning A080237-tree and related sequences.</a> %H A080237 R. P. Stanley, <a href="http://www-math.mit.edu/~rstan/ec/catadd.pdf">Catalan addendum</a>. See the interpretation (www, "Vertices of height n-1 of the tree T ..."). %F A080237 It seems that Sum_{k=1..n} a(k) = C*n*log(log(n)) + O(n*log(log(n))) with C = 0.6.... %F A080237 a(n) = A007814(A014486(n)) (i.e., number of trailing zeros in A063171(n)). %e A080237 As an irregular triangle: %e A080237 1; %e A080237 1,2; %e A080237 1,2,1,2,3; %e A080237 1,2,1,2,3,1,2,1,2,3,1,2,3,4; %e A080237 ... %e A080237 Sequence begins: 1,(1,2),(1,2),(1,2,3), ... where runs are between 2 parentheses. 5th run is (1,2) since a(4)=1 and sequence continues: 1,1,2,1,2,1,2,3,1,2.... %e A080237 G.f. = x + x^2 + 2*x^3 + x^4 + 2*x^5 + x^6 + 2*x^7 + 3*x^8 + x^9 + 2*x^10 + ... %t A080237 run[1] = {1}; run[k_] := run[k] = Range[ Flatten[ Table[run[j], {j, 1, k-1}]][[k-1]] + 1]; Table[run[k], {k, 1, 29}] // Flatten (* _Jean-François Alcover_, Sep 12 2012 *) %t A080237 NestList[ Flatten[# /. # -> Range[# + 1]] &, {1}, 5] // Flatten (* _Robert G. Wilson v_, Jun 24 2014 *) %o A080237 (PARI) {a(n) = my(v, i, j, k); if( n<1, 0, v=vector(n); for(m=1, n, v[m]=k++; if( k>j, j=v[i++]; k=0)); v[n])}; /* _Michael Somos_, Jun 24 2014 */ %o A080237 (Haskell) %o A080237 a080237 n k = a080237_tabf !! (n-1) !! (k-1) %o A080237 a080237_row n = a080237_tabf !! (n-1) %o A080237 a080237_tabf = [1] : f a080237_tabf where %o A080237 f [[]] =[] %o A080237 f (xs:xss) = concatMap (enumFromTo 1 . (+ 1)) xs : f xss %o A080237 a080237_list = concat a080237_tabf %o A080237 -- _Reinhard Zumkeller_, Jun 01 2015 %Y A080237 Cf. A000002, A007001. Positions of ones: A085223. The first occurrence of each n is at A014138(n). See A085178. %K A080237 nonn,tabf %O A080237 1,3 %A A080237 _Benoit Cloitre_, Mar 18 2003