cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A317208 The Wythoff representation of n: an alternative way of presenting A189921.

This page as a plain text file.
%I A317208 #21 Jul 01 2023 08:29:51
%S A317208 0,1,2,12,112,22,1112,212,122,11112,2112,1212,1122,222,111112,21112,
%T A317208 12112,11212,2212,11122,2122,1222,1111112,211112,121112,112112,22112,
%U A317208 111212,21212,12212,111122,21122,12122,11222,2222,11111112,2111112,1211112,1121112
%N A317208 The Wythoff representation of n: an alternative way of presenting A189921.
%C A317208 This is an encoding of the position of n in the A000201, A001950 "Wythoff" table T.
%C A317208 Let T denote the following 3-rowed table, whose rows are n, A = A000201(n), B = A001950(n):
%C A317208 n: 1 2 3 .4 .5 .6 .7 .8 .9 ...
%C A317208 A: 1 3 4 .6 .8 .9 11 12 14 ...
%C A317208 B: 2 5 7 10 13 15 18 20 23 ...
%C A317208 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.
%C A317208 This is another way of writing the Wythoff representation of n described in Lang (1996) and A189921.
%D A317208 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.
%H A317208 Lars Blomberg, <a href="/A317208/b317208.txt">Table of n, a(n) for n = 0..10000</a>
%H A317208 Wolfdieter Lang, <a href="/A317208/a317208.pdf">The Wythoff and the Zeckendorf representations of numbers are equivalent</a>, 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.]
%t A317208 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 *)
%Y A317208 Cf. A189921, A135817 (length).
%Y A317208 Cf. also A317207.
%Y A317208 Cf. A000201, A001950.
%K A317208 nonn,base
%O A317208 0,3
%A A317208 _N. J. A. Sloane_, Aug 09 2018
%E A317208 a(23) and beyond from _Lars Blomberg_, Aug 11 2018