login
Counting sequence for Wythoff AB-numbers smaller than n.
1

%I #24 Jun 11 2024 09:39:21

%S 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,

%T 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,

%U 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

%N Counting sequence for Wythoff AB-numbers smaller than n.

%C a(n) is the number of Wythoff AB-numbers from A003623 which are less than n.

%C a(n) is also the number of Wythoff A-pairs (two consecutive numbers which are both Wyhoff A-numbers) not exceeding n.

%C a(n) is also the number of Wythoff BA-numbers (including 2= B(A(1)) which however has Wythoff representation 0 for B(1)) not exceeding n-2. From the identity B(A(n)) = A(B(n))- 1.

%C For the Wythoff representation of numbers see A189921 and A135817.

%H Martin Griffiths, <a href="https://www.fq.math.ca/Papers1/56-1/GriffithsmgFibWordSeq121517.pdf">A formula for an infinite family of Fibonacci-word sequences</a>, Fib. Q., 56 (2018), 75-80.

%F a(n) = Sum_{j=0..n-1} A123740(j), with A123740(0)=0.

%F a(n) = A(n+1) + A(n) - (3*n+1), with the Wythoff A-numbers A000201.

%F a(n) = z(n) + z(n-1) - n, with z(n) = A005206(n) = A060143(n+1) which counts A-numbers <=n.

%F Note that no floor function definitions are necessary.

%F 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.

%F a(n) = floor(n/phi) - floor((1+n)/(1+phi)). - _Frank Ruskey_, Nov 30 2011

%e a(9) = 2 = A(10) + A(9) - (3*9+1) = 16 + 14 - 28.

%e a(9) = 2 = z(9) - z(8) - 9 = 6 + 5 - 9.

%e There are a(9)=2 AB-numbers <9, namely 3=A(B(1)) and 8=A(B(B(1)).

%e There are a(9)=2 A-pairs <=9, namely 3,4 and 8,9.

%e There are a(9)=2 BA-numbers <=7, namely 2 (see the comment above) and 7 = B(A(B(1))).

%o (Python)

%o from math import isqrt

%o 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

%K nonn,easy

%O 1,9

%A _Wolfdieter Lang_, Jun 28 2011