

A189921


Wythoff representation of natural numbers.


9



1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1


COMMENTS

The row lengths sequence of this array is A135817.
For the Wythoff representation of n see the W. Lang reference.
The Wythoff complementary sequences are A(n):=A000201(n) and B(n)=A001950(n), n>=1. The Wythoff representation of n=1 is A(1) and for n>=2 there is a unique representation as composition of A or Bsequence applied to B(1)=2. E.g. n=4 is A(A(B(1))), written as AAB or as `110` or here as 1,1,0, i.e., 1 for A and 0 for B.
The Wythoff orbit of 1 (starting always with B(1), applying any number of A or Bsequences) produces every number n>1 just once. This produces a binary Wythoff code for n>1, ending always in 0 (for B(1)).


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. 319337. [See A317208 for a link.]


LINKS



FORMULA

The entries of row n, n>=1, are given by W(n), computed with the algorithm given on p. 335 of the W. Lang reference. 1 is used for Wythoff's A sequence and 0 for the B sequence.


EXAMPLE

n=1: 1;
n=2: 0;
n=3: 1, 0;
n=4: 1, 1, 0;
n=5: 0, 0;
n=6: 1, 1, 1, 0;
n=7: 0, 1, 0;
n=8: 1, 0, 0;
...
1 = A(1); 2 = B(1), 3 = A(B(1)), 4 = A(A(B(1))),
5 = B(B(1)), 6 = A(A(A(B(1)))), 7 = B(A(B(1))),
8 = A(B(B(1))), ...


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]; w[0] = 0; Table[w[n], {n, 1, 25}] // Flatten (* Amiram Eldar, Jul 01 2023 *)


CROSSREFS

See A317208 for another encoding; also for the link to the scanned W. Lang article with corrections.


KEYWORD

nonn,easy,tabf,base


AUTHOR



STATUS

approved



