A361574 a(n) is the number of Fibonacci meanders of length m*n and central angle 360/m degrees where m = 3.
1, 3, 8, 21, 68, 242, 861, 3151, 11874, 45192, 173496, 673042
Offset: 1
Examples
For n = 4 the Fibonacci meanders with central angle 120 degrees and length 12, written as binary strings (L = 1, R = 0), are: 100000010001, 100010000001, 110000000001, 100000100100, 100100000100, 100010001000, 110000001000, 100100100000, 110001000000, 111000000000, 110100100101, 111001001001, 111100010001, 111110000001, 111010010010, 111100100100, 111110001000, 111111000000, 111111110001, 111111111000, 111111111111.
Links
- Jean-Luc Baril, Sergey Kirgizov, Rémi Maréchal, and Vincent Vajnovszki, Enumeration of Dyck paths with air pockets, arXiv:2202.06893 [cs.DM], 2022-2023.
- Peter Luschny, Fibonacci meanders.
- Susanne Wienand, Counting meanders by dynamic programming.
- Susanne Wienand, Example of a meander, Plot and animation.
Programs
-
SageMath
def isFibonacci(S: list[bool]) -> bool: dir, os = True, S[0] for s in S: if s and os: if not dir: return False dir = True else: dir = False os = s return True def isMeander(n: int, S: list[bool]) -> bool: if S[0] != True: return False vec = [0] * n max = len(S) // n dir, ob = 0, True for b in S: if b and ob: dir += 1 elif not b and not ob: dir -= 1 dir = dir % n v = vec[dir] = vec[dir] + 1 if v > max: return False ob = b return True def FibonacciMeanders(m: int, steps: int) -> int: size = m * steps count = 0 for a in range(0, size + 1, m): S = [i < a for i in range(size)] for c in Permutations(S): if c[0] == 0: break if not isFibonacci(c): continue if not isMeander(m, c): continue count += 1 print(count) return count def FibonacciMeandersColumn(m: int, size: int) -> list[int]: return [FibonacciMeanders(m, n) for n in range(1, size + 1)] print([FibonacciMeandersColumn(3, n) for n in range(1, 7)])
Comments