login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080237 Start with 1 and apply the process: k-th run is 1, 2, 3, ..., a(k-1)+1. 12
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, 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, 3, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Also a triangle collected from the Catalan generating tree, with row n containing A000108(n) terms:

1;

1,2;

1,2,1,2,3;

1,2,1,2,3,1,2,1,2,3,1,2,3,4;

and ending with n. Rows converge towards A007001, the "last" row.

LINKS

Reinhard Zumkeller, >Rows n = 1..10 of triangle, flattened

C. Banderier, A. Denise, P. Flajolet, M. Bousquet-Mélou et al., Generating Functions for Generating Trees, Discrete Mathematics 246(1-3), March 2002, pp. 29-55.

A. Karttunen, Notes concerning A080237-tree and related sequences.

R. P. Stanley, Catalan addendum. See the interpretation (www, "Vertices of height n-1 of the tree T ...").

FORMULA

It seems that Sum_{k=1..n} a(k) = C*n*log(log(n)) + O(n*log(log(n))) with C = 0.6....

a(n) = A007814(A014486(n)) (i.e., number of trailing zeros in A063171(n)).

EXAMPLE

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....

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 + ...

MATHEMATICA

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 *)

NestList[ Flatten[# /. # -> Range[# + 1]] &, {1}, 5] // Flatten (* Robert G. Wilson v, Jun 24 2014 *)

PROG

(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 */

(Haskell)

a080237 n k = a080237_tabf !! (n-1) !! (k-1)

a080237_row n = a080237_tabf !! (n-1)

a080237_tabf = [1] : f a080237_tabf where

   f [[]] =[]

   f (xs:xss) = concatMap (enumFromTo 1 . (+ 1)) xs : f xss

a080237_list = concat a080237_tabf

-- Reinhard Zumkeller, Jun 01 2015

CROSSREFS

Cf. A000002, A007001. Positions of ones: A085223. The first occurrence of each n is at A014138(n). See A085178.

Sequence in context: A067815 A133780 A270808 * A136109 A105265 A193360

Adjacent sequences:  A080234 A080235 A080236 * A080238 A080239 A080240

KEYWORD

nonn,tabf

AUTHOR

Benoit Cloitre, Mar 18 2003

EXTENSIONS

Additional comments from Antti Karttunen, Jun 17 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified June 28 04:43 EDT 2017. Contains 288813 sequences.