%I #87 Sep 20 2022 14:23:29
%S 2,7,10,15,20,23,28,31,36,41,44,49,54,57,62,65,70,75,78,83,86,91,96,
%T 99,104,109,112,117,120,125,130,133,138,143,146,151,154,159,164,167,
%U 172,175,180,185,188,193,198,201,206,209,214,219,222,227,230,235,240
%N a(n) = 2*floor(n*phi) + n - 1, where phi = (1+sqrt(5))/2.
%C Second column of Wythoff array.
%C These are the numbers in A022342 that are not images of another value of the same sequence if it is given offset 0. - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001
%C Also, positions of 2's in A139764, the smallest term in Zeckendorf representation of n. - _John W. Layman_, Aug 25 2011
%C From _Amiram Eldar_, Mar 21 2022: (Start)
%C Numbers k for which the Zeckendorf representation A014417(k) ends with 0, 1, 0.
%C The asymptotic density of this sequence is sqrt(5)-2. (End)
%H Reinhard Zumkeller, <a href="/A035336/b035336.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 J. H. Conway and N. J. A. Sloane, <a href="/A019586/a019586.pdf">Notes on the Para-Fibonacci and related sequences</a>.
%H Clark Kimberling, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL11/Kimberling/kimberling719a.html">Complementary equations and Wythoff Sequences</a>, JIS, Vol. 11 (2008), Article 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 Kenneth 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, Vol. 123, No. 2 (2016), pp. 267-273.
%H N. J. A. Sloane, <a href="/classic.html#WYTH">Classic Sequences</a>.
%F a(n) = B(A(n)), with A(k)=A000201(k) and B(k)=A001950(k) (Wythoff BA-numbers).
%F a(n) = A(n) + A(A(n)), with A(A(n))=A003622(n) (Wythoff AA-numbers).
%F Equals A022342(A003622(n)+1). - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001, sequence reference updated by _Peter Munn_, Nov 23 2017
%F a(n) = 2*A003622(n) - (n - 1) = A003623(n) - 1. - _Franklin T. Adams-Watters_, Jun 30 2009
%F A005713(a(n)) = 0. - _Reinhard Zumkeller_, Dec 30 2011
%F a(n) = A089910(n) - 2. - _Bob Selcoe_, Sep 21 2014
%p Digits := 100: t := (1+sqrt(5))/2; [ seq(2*floor((n+1)*t)+n,n=0..80) ];
%t Table[2*Floor[n*(1 + Sqrt[5])/2] + n - 1, {n, 50}] (* _Wesley Ivan Hurt_, Nov 21 2017 *)
%t Array[2 Floor[# GoldenRatio] + # - 1 &, 60] (* _Robert G. Wilson v_, Dec 12 2017 *)
%o (Haskell)
%o import Data.List (elemIndices)
%o a035336 n = a035336_list !! (n-1)
%o a035336_list = elemIndices 0 a005713_list
%o -- _Reinhard Zumkeller_, Dec 30 2011
%o (Magma) [2*Floor(n*(1+Sqrt(5))/2)+n-1: n in [1..80]]; // _Vincenzo Librandi_, Nov 19 2016
%o (Python)
%o from sympy import floor
%o from mpmath import phi
%o def a(n): return 2*floor(n*phi) + n - 1 # _Indranil Ghosh_, Jun 10 2017
%o (Python)
%o from math import isqrt
%o def A035336(n): return (n+isqrt(5*n**2)&-2)+n-1 # _Chai Wah Wu_, Aug 17 2022
%Y Cf. A001622, A014417, A022342, A066096.
%Y Cf. A139764, A089910, A194584.
%Y Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864.
%K nonn
%O 1,1
%A _N. J. A. Sloane_ and _J. H. Conway_