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 A192002 #28 Feb 15 2025 05:36:59 %S A192002 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 A192002 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 A192002 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 A192002 Counting sequence for Wythoff AB-numbers smaller than n. %C A192002 a(n) is the number of Wythoff AB-numbers from A003623 which are less than n. %C A192002 a(n) is also the number of Wythoff A-pairs (two consecutive numbers which are both Wythoff A-numbers) not exceeding n. %C A192002 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 A192002 For the Wythoff representation of numbers see A189921 and A135817. %H A192002 Martin Griffiths, <a href="https://web.archive.org/web/2024*/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 A192002 a(n) = Sum_{j=0..n-1} A123740(j), with A123740(0)=0. %F A192002 a(n) = A(n+1) + A(n) - (3*n+1), with the Wythoff A-numbers A000201. %F A192002 a(n) = z(n) + z(n-1) - n, with z(n) = A005206(n) = A060143(n+1) which counts A-numbers <=n. %F A192002 Note that no floor function definitions are necessary. %F A192002 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 A192002 a(n) = floor(n/phi) - floor((1+n)/(1+phi)). - _Frank Ruskey_, Nov 30 2011 %e A192002 a(9) = 2 = A(10) + A(9) - (3*9+1) = 16 + 14 - 28. %e A192002 a(9) = 2 = z(9) - z(8) - 9 = 6 + 5 - 9. %e A192002 There are a(9)=2 AB-numbers <9, namely 3=A(B(1)) and 8=A(B(B(1))). %e A192002 There are a(9)=2 A-pairs <=9, namely 3,4 and 8,9. %e A192002 There are a(9)=2 BA-numbers <=7, namely 2 (see the comment above) and 7 = B(A(B(1))). %o A192002 (Python) %o A192002 from math import isqrt %o A192002 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 %Y A192002 Cf. A000201 (Wythoff A-numbers), A001950 (Wythoff B-numbers), A003623 (Wythoff AB-numbers), A123740. %K A192002 nonn,easy %O A192002 1,9 %A A192002 _Wolfdieter Lang_, Jun 28 2011