The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A057514 Number of peaks in mountain ranges encoded by A014486, number of leaves in the corresponding rooted plane trees (the root node is never counted as a leaf). 11
 0, 1, 2, 1, 3, 2, 2, 2, 1, 4, 3, 3, 3, 2, 3, 2, 3, 3, 2, 2, 2, 2, 1, 5, 4, 4, 4, 3, 4, 3, 4, 4, 3, 3, 3, 3, 2, 4, 3, 3, 3, 2, 4, 3, 4, 4, 3, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 2, 1, 6, 5, 5, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 3, 5, 4, 4, 4, 3, 5, 4, 5, 5, 4, 4, 4, 4, 3, 4, 3, 4, 4, 3, 4, 4, 4, 3, 3, 3, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Sum_{i=A014137(n)..(A014137(n+1)-1)} a(i) = A001700(n), i.e., A001700(n) gives the total number of leaves in all ordered trees with n + 1 edges. LINKS Indranil Ghosh, Table of n, a(n) for n = 0..3485 Antti Karttunen, Gatomorphisms and other excursions ... (Includes Scheme program) Antti Karttunen, Newer version of the Scheme code collection FORMULA a(n) = A005811(A014486(n))/2 = A000120(A003188(A014486(n)))/2. PROG (Python) def a005811(n): return bin(n^(n>>1))[2:].count("1") def ok(n): # This function after Peter Luschny     B=bin(n)[2:] if n!=0 else 0     s=0     for b in B:         s+=1 if b=="1" else -1         if s<0: return 0     return s==0 def A(n): return [0] + [i for i in range(1, n + 1) if ok(i)] l=A(200) print([a005811(l[i])//2 for i in range(len(l))]) # Indranil Ghosh, May 21 2017 CROSSREFS Cf. A000108, A000120, A001700, A003188, A005811, A014137, A014486, A057515. a(n)-1 gives the number of zeros in A071153(n) (for n>=1). Sequence in context: A084216 A347240 A308751 * A273568 A140720 A033559 Adjacent sequences:  A057511 A057512 A057513 * A057515 A057516 A057517 KEYWORD nonn AUTHOR Antti Karttunen, Sep 03 2000 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 8 19:45 EST 2021. Contains 349596 sequences. (Running on oeis4.)