login
Digits in the concatenation of strings formed from a previous string by substituting "01" for "0" and "011" for "1" simultaneously at each occurrence. Start with [0].
0

%I #9 Aug 17 2022 22:20:53

%S 0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,

%T 0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,

%U 0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0

%N Digits in the concatenation of strings formed from a previous string by substituting "01" for "0" and "011" for "1" simultaneously at each occurrence. Start with [0].

%H Chris Long, <a href="https://web.archive.org/web/20060910235254/http://www.math.rutgers.edu/~clong/math/problems/recursive.pdf">A strange recursive sequence</a>

%F a(n)=1 if n = floor(phi*m) or a(n)=0 if n = floor(phi^2*m), for some positive integer m; a(0)=0 (phi denotes the golden ratio: (1 + sqrt(5))/2). a(0)=0; a(n)=1 if n belongs to A000201 (Lower Wythoff sequence) or 0 if n belongs to A001950 (Upper Wythoff sequence).

%e 0->01->01011->0101101011011->0101101011011010110101101101011011->... and then juxtapose: 0010101101011010110110101101011011010110101101101011011...

%o (PARI) v=[0]; for(n=1,5,w=[];for(k=1,length(v),if(v[k]==0,w=concat(w,[0,1]),w=concat(w,[0,1,1])));v=w;for(l=1,length(v),print1(v[l],",")))

%o (Python)

%o from math import isqrt

%o def A095907_gen(): # generator of terms

%o k = 1

%o for n in count(3):

%o m = (n+isqrt(5*n**2)>>1)

%o for _ in range(m-k-1):

%o yield 0

%o yield 1

%o k = m

%o A095907_list = list(islice(A095907_gen(),30)) # _Chai Wah Wu_, Aug 17 2022

%Y Cf. A005614, A096270, A114986, A189479.

%K nonn

%O 1,1

%A Herman Jamke (hermanjamke(AT)fastmail.fm), Jul 13 2004