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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A126306 a(n) = number of double-rises (UU-subsequences) in the n-th Dyck path encoded by A014486(n). 3
0, 0, 0, 1, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 3, 0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 3, 1, 2, 1, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 4, 0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 3, 1, 2, 1, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,9

LINKS

Table of n, a(n) for n=0..101.

FORMULA

a(n) = A014081(A014486(n)).

EXAMPLE

A014486(20) = 228 (11100100 in binary), encodes the following Dyck path:

../\

./..\/\

/......\

and there is one rising (left-hand side) slope with length 3 and one with length 1, so in the first slope, consisting of 3 U-steps, there are two cases with two consecutive U-steps (overlapping is allowed), thus a(20)=2.

PROG

(Python)

def ok(n):

    if n==0: return 1

    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 False

    return s==0

def a014081(n): return sum([((n>>i)&3==3) for i in range(len(bin(n)[2:]) - 1)])

print [a014081(n) for n in range(4001) if ok(n)] # Indranil Ghosh, Jun 13 2017

CROSSREFS

a(n) = A000120(A048735(A014486(n))). a(A125976(n)) = A057514(n)-1, for all n >= 1.

Sequence in context: A179181 A153246 A025889 * A287356 A029402 A330443

Adjacent sequences:  A126303 A126304 A126305 * A126307 A126308 A126309

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jan 02 2007

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 29 14:23 EST 2020. Contains 331338 sequences. (Running on oeis4.)