A192002 Counting sequence for Wythoff AB-numbers smaller than n.
0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 21, 21, 21
Offset: 1
Examples
a(9) = 2 = A(10) + A(9) - (3*9+1) = 16 + 14 - 28. a(9) = 2 = z(9) - z(8) - 9 = 6 + 5 - 9. There are a(9)=2 AB-numbers <9, namely 3=A(B(1)) and 8=A(B(B(1))). There are a(9)=2 A-pairs <=9, namely 3,4 and 8,9. There are a(9)=2 BA-numbers <=7, namely 2 (see the comment above) and 7 = B(A(B(1))).
Links
- Martin Griffiths, A formula for an infinite family of Fibonacci-word sequences, Fib. Q., 56 (2018), 75-80.
Crossrefs
Programs
-
Python
from math import isqrt def A192002(n): return (n+isqrt(m:=5*n**2)>>1)+(n+1+isqrt(m+10*n+5)>>1)-3*n-1 # Chai Wah Wu, Aug 10 2022
Formula
a(n) = A(n+1) + A(n) - (3*n+1), with the Wythoff A-numbers A000201.
Note that no floor function definitions are necessary.
A(n) (which is as Beatty sequence also floor(n*phi), with phi=(1+sqrt(5))/2) can be defined from the rabbit sequence A005614(n-1), n>=1, which results from a substitution rule, via z(n) by A(n):= z(n-1) + n, B(n):= A(n) + n.
a(n) = floor(n/phi) - floor((1+n)/(1+phi)). - Frank Ruskey, Nov 30 2011
Comments