OFFSET
0,3
COMMENTS
n: 1 2 3 .4 .5 .6 .7 .8 .9 ...
A: 1 3 4 .6 .8 .9 11 12 14 ...
B: 2 5 7 10 13 15 18 20 23 ...
Set a(0)=0. For n>0, locate n in rows A and B of the table, and indicate how to reach that entry starting from column 1. For example, 18 = B(7) = B(B(3)) = B(B(A(2))) = B(B(A(B(1)))), so the path to reach 18 is BBAB, which we write (encoding A as 1, B as 2) as a(18) = 2212.
This is another way of writing the Wythoff representation of n described in Lang (1996) and A189921.
REFERENCES
Wolfdieter Lang, The Wythoff and the Zeckendorf representations of numbers are equivalent, in G. E. Bergum et al. (edts.) Application of Fibonacci numbers vol. 6, Kluwer, Dordrecht, 1996, pp. 319-337.
LINKS
Lars Blomberg, Table of n, a(n) for n = 0..10000
Wolfdieter Lang, The Wythoff and the Zeckendorf representations of numbers are equivalent, in G. E. Bergum et al. (edts.) Application of Fibonacci numbers vol. 6, Kluwer, Dordrecht, 1996, pp. 319-337. [Corrected scanned copy, with permission of the author.]
MATHEMATICA
z[n_] := Floor[(n + 1)*GoldenRatio] - n - 1; h[n_] := z[n] - z[n - 1]; w[n_] := Module[{m = n, zm = 0, hm, s = {}}, While[zm != 1, hm = h[m]; AppendTo[s, hm]; If[hm == 1, zm = z[m], zm = z[z[m]]]; m = zm]; s]; a[n_] := FromDigits[ReplaceAll[w[n], {0 :> 2}]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 01 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Aug 09 2018
EXTENSIONS
a(23) and beyond from Lars Blomberg, Aug 11 2018
STATUS
approved