OFFSET
1,1
COMMENTS
The lower and upper Wythoff sequences, A and B, satisfy the complementary equations AAB=AA+AB and AAB=A+2B-1.
The asymptotic density of this sequence is 1/phi^4 = 2/(7+3*sqrt(5)), where phi is the golden ratio (A001622). - Amiram Eldar, Mar 21 2022
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Aviezri S. Fraenkel, Complementary iterated floor words and the Flora game, SIAM J. Discrete Math., Vol. 24, No. 2 (2010), pp. 570-588. - N. J. A. Sloane, May 06 2011
Clark Kimberling, Complementary equations and Wythoff Sequences, Journal of Integer Sequences, Vol. 11 (2008), Article 08.3.3.
FORMULA
MATHEMATICA
With[{r = Map[Fibonacci, Range[2, 14]]}, Position[#, {1, 0, 1}][[All, 1]] &@ Table[If[Length@ # < 3, {}, Take[#, -3]] &@ IntegerDigits@ Total@ Map[FromDigits@ PadRight[{1}, Flatten@ #] &@ Reverse@ Position[r, #] &, Abs@ Differences@ NestWhileList[Function[k, k - SelectFirst[Reverse@ r, # < k &]], n + 1, # > 1 &]], {n, 373}]] (* Michael De Vlieger, Jun 09 2017 *)
PROG
(Python)
from sympy import fibonacci
def a(n):
x=0
while n>0:
k=0
while fibonacci(k)<=n: k+=1
x+=10**(k - 3)
n-=fibonacci(k - 1)
return x
def ok(n): return str(a(n))[-3:]=="101"
print([n for n in range(4, 501) if ok(n)]) # Indranil Ghosh, Jun 08 2017
(Python)
from math import isqrt
def A134860(n): return 3*(n+isqrt(5*n**2)>>1)+(n<<1)-1 # Chai Wah Wu, Aug 10 2022
CROSSREFS
Cf. A000201, A001622, A001950, A003622, A003623, A035336, A101864, A134859, A035337, A134861, A134862, A134863, A035338, A134864, A035513.
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jun 01 2004 and Clark Kimberling, Nov 14 2007
EXTENSIONS
This is the result of merging two sequences which were really the same. - N. J. A. Sloane, Jun 10 2017
STATUS
approved