%I M2715 #86 Dec 20 2023 08:05:11
%S 3,8,11,16,21,24,29,32,37,42,45,50,55,58,63,66,71,76,79,84,87,92,97,
%T 100,105,110,113,118,121,126,131,134,139,144,147,152,155,160,165,168,
%U 173,176,181,186,189,194,199,202,207,210,215,220,223,228,231,236,241,244,249
%N Wythoff AB-numbers: floor(floor(n*phi^2)*phi), where phi = (1+sqrt(5))/2.
%C Previous name was: "From a 3-way splitting of positive integers: [[n*phi^2]*phi]."
%C Union of A001950 & A003622 & A003623 = A000027.
%C a(n) is odd if and only if n is odd. - _Clark Kimberling_, Apr 21 2011
%C A005614(a(n)-1)=1 and A005614(a(n))=1, n>=1. Because Wythoff AB-numbers (see the formula section) mark the first entry of pairs of 1s in the rabbit sequence A005614(n-1), n>=1. - _Wolfdieter Lang_, Jun 28 2011
%C a(n) = k if and only if A270788(k) = 3, where A270788 is the infinite Fibonacci word on {1,2,3}. - _Michel Dekking_, Sep 07 2016
%D J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 10.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Nathaniel Johnston, <a href="/A003623/b003623.txt">Table of n, a(n) for n = 1..10000</a>
%H J.-P. Allouche and F. M. Dekking, <a href="https://arxiv.org/abs/1809.03424">Generalized Beatty sequences and complementary triples</a>, arXiv:1809.03424 [math.NT], 2018.
%H Benoit Cloitre and Jeffrey Shallit, <a href="https://arxiv.org/abs/2312.11706">Some Fibonacci-Related Sequences</a>, arXiv:2312.11706 [math.CO], 2023.
%H Aviezri S. Fraenkel, <a href="https://www.emis.de/journals/INTEGERS/papers/a13int2005/a13int2005.Abstract.html">The Raleigh game</a>, INTEGERS: Electronic Journal of Combinatorial Number Theory 7.2 (2007): A13, 10 pages. See Table 1.
%H Aviezri S. Fraenkel, <a href="http://dx.doi.org/10.1137/090758994">Complementary iterated floor words and the Flora game</a>, SIAM J. Discrete Math. 24 (2010), no. 2, 570-588. - From _N. J. A. Sloane_, May 06 2011
%H A. J. Hildebrand, Junxian Li, Xiaomin Li and Yun Xie, <a href="https://arxiv.org/abs/1809.08690">Almost Beatty Partitions</a>, arXiv:1809.08690 [math.NT], 2018.
%H Clark Kimberling, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL11/Kimberling/kimberling719a.html">Complementary equations and Wythoff Sequences</a>, JIS 11 (2008) 08.3.3.
%H Clark Kimberling, <a href="https://doi.org/10.4171/EM/468">Intriguing infinite words composed of zeros and ones</a>, Elemente der Mathematik (2021).
%H Clark Kimberling and K. B. Stolarsky, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.123.3.267">Slow Beatty sequences, devious convergence, and partitional divergence</a>, Amer. Math. Monthly, 123 (No. 2, 2016), 267-273.
%H U. Larsson and N. Fox, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Larsson/larsson8.html">An Aperiodic Subtraction Game of Nim-Dimension Two</a>, Journal of Integer Sequences, 2015, Vol. 18, #15.7.4.
%H F. V. Weinstein, <a href="https://arxiv.org/abs/math/0307150">Notes on Fibonacci partitions</a>, arXiv:math/0307150 [math.NT], 2003-2015 (see page 2, essential numbers).
%H <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>
%F a(n) = floor(n*phi) + floor(n*phi^2) = A000201(n) + A001950(n).
%F a(n) = 2*floor(n*phi) + n = 2*A000201(n) + n.
%F a(n) = A(B(n)) with A(k):=A000201(k) and B(k):=A001950(k), k>=1 (Wythoff AB-numbers).
%p A003623:=proc(n) return floor(floor(n*(3+sqrt(5))/2)*(1+sqrt(5))/2); end:seq(A003623(n),n=1..59); # _Nathaniel Johnston_, Apr 21 2011
%t f[n_] := Floor[ GoldenRatio * Floor[ n * GoldenRatio^2]]; Array[f, 47]
%t (* another *) Table[n+2Floor[n*GoldenRatio],{n,1,100}]
%o (Python)
%o from sympy import floor
%o from mpmath import phi
%o def a(n): return floor(n*phi) + floor(n*phi**2) # _Indranil Ghosh_, Jun 10 2017
%o (Python)
%o from math import isqrt
%o def A003623(n): return (n+isqrt(5*n**2)&-2)+n # _Chai Wah Wu_, Aug 25 2022
%o (PARI) a(n)=(n+sqrtint(5*n^2))\2*2+n \\ _Charles R Greathouse IV_, Jan 25 2022
%Y Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864.
%K nonn,nice,easy
%O 1,1
%A _N. J. A. Sloane_, _Mira Bernstein_
%E Name improved by _Michel Dekking_, Sep 07 2016