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 A126306 #16 May 08 2021 08:35:36 %S A126306 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, %T A126306 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, %U A126306 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 %N A126306 a(n) = number of double-rises (UU-subsequences) in the n-th Dyck path encoded by A014486(n). %F A126306 a(n) = A014081(A014486(n)). %F A126306 a(n) = A000120(A048735(A014486(n))). %F A126306 a(A125976(n)) = A057514(n)-1, for all n >= 1. %e A126306 A014486(20) = 228 (11100100 in binary), encodes the following Dyck path: %e A126306 /\ %e A126306 /..\/\ %e A126306 /......\ %e A126306 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. %o A126306 (Python) %o A126306 def ok(n): %o A126306 if n==0: return True %o A126306 B=bin(n)[2:] if n!=0 else '0' %o A126306 s=0 %o A126306 for b in B: %o A126306 s+=1 if b=='1' else -1 %o A126306 if s<0: return False %o A126306 return s==0 %o A126306 def a014081(n): return sum(((n>>i)&3==3) for i in range(len(bin(n)[2:]) - 1)) %o A126306 print([a014081(n) for n in range(4001) if ok(n)]) # _Indranil Ghosh_, Jun 13 2017 %Y A126306 Cf. A014081, A014486, A000120, A048735, A125976, A057514. %K A126306 nonn %O A126306 0,9 %A A126306 _Antti Karttunen_, Jan 02 2007