OFFSET
1,4
COMMENTS
Let S be the set of numbers defined by these rules: 1 is in S, and if x is in S, then x+1 and 1/x are in S. Then S is the set of positive rational numbers, which arise in generations as follows: g(1) = (1/1), g(2) = (1+1) = (2), g(3) = (2+1, 1/2) = (3/1, 1/2), g(4) = (4/1, 1/3, 3/2), ... . Once g(n-1) = (g(1), ..., g(z)) is defined, g(n) is formed from the vector (g(1) + 1, 1/g(1), g(2) + 1, 1/g(2), ..., g(z) + 1, 1/g(z)) by deleting all elements that are in a previous generation. A226080 is the sequence of denominators formed by concatenating the generations g(1), g(2), g(3), ... . It is easy to prove the following:
(1) Every positive rational is in S.
(2) The number of terms in g(n) is the n-th Fibonacci number, F(n) = A000045(n).
(3) For n > 2, g(n) consists of F(n-2) numbers < 1 and F(n-1) numbers > 1, hence the name "rabbit ordering" since the n-th generation has F(n-2) reproducing pairs and F(n-1) non-reproducing pairs, as in the classical rabbit-reproduction introduction to Fibonacci numbers.
(4) The positions of integers in S are the Fibonacci numbers.
(5) The positions of 1/2, 3/2, 5/2, ..., are Lucas numbers (A000032).
(6) Continuing from (4) and (5), suppose that n > 0 and 0 < r < n, where gcd(n,r) = 1. The positions in A226080 of the numbers congruent to r mod n comprise a row of the Wythoff array, W = A035513. The correspondence is sampled here:
row 1 of W: positions of n+1 for n>=0,
row 2 of W: positions of n+1/2,
row 3 of W: positions of n+1/3,
row 4 of W: positions of n+1/4,
row 5 of W: positions of n+2/3,
row 6 of W: positions of n+1/5,
row 7 of W: positions of n+3/4.
(7) If the numbers <=1 in S are replaced by 1 and those >1 by 0, the resulting sequence is the infinite Fibonacci word A003849 (except for the 0-offset first term).
(8) The numbers <=1 in S occupy positions -1 + A001950, where A001950 is the upper Wythoff sequence; those > 1 occupy positions given by -1 + A000201, where A000201 is the lower Wythoff sequence.
(9) The rules (1 is in S, and if x is in S, then 1/x and 1/(x+1) are in S) also generate all the positive rationals.
A variant which extends this idea to an ordering of all rationals is described in A226130. - M. F. Hasler, Jun 03 2013
The updown and downup zigzag limits are (-1 + sqrt(5))/2 and (1 + sqrt(5))/2; see A020651. - Clark Kimberling, Nov 10 2013
From Clark Kimberling, Jun 19 2014: (Start)
Following is a guide to related trees and sequences; for example, the tree A226080 is represented by (1, x+1, 1/x), meaning that 1 is in S, and if x is in S, then x+1 and 1/x are in S (except for x = 0).
All the positive integers:
A243573 (1, x+1, 4x)
All the integers:
A243610 (1, 2x, 1-x)
All the positive rationals:
All the rationals:
All the Gaussian integers:
A243924 (1, x+1, i*x)
All the Gaussian rational numbers:
(End)
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..6000
Clark Kimberling, The infinite Fibonacci tree and other trees generated by rules, Proceedings of the 16th International Conference on Fibonacci Numbers and Their Applications, Fibonacci Quarterly 52 (2014), no. 5, pp. 136-149.
EXAMPLE
The denominators are read from the rationals listed in "rabbit order":
1/1, 2/1, 3/1, 1/2, 4/1, 1/3, 3/2, 5/1, 1/4, 4/3, 5/2, 2/3, 6/1, ...
MATHEMATICA
z = 10; g[1] = {1}; g[2] = {2}; g[3] = {3, 1/2};
j[3] = Join[g[1], g[2], g[3]]; j[n_] := Join[j[n - 1], g[n]];
d[s_List, t_List] := Part[s, Sort[Flatten[Map[Position[s, #] &, Complement[s, t]]]]]; j[3] = Join[g[1], g[2], g[3]]; n = 3; While[n <= z, n++; g[n] = d[Riffle[g[n - 1] + 1, 1/g[n - 1]], g[n - 2]]];
Table[g[n], {n, 1, z}]; j[z] (* rabbit-ordered rationals *)
Denominator[j[z]] (* A226080 *)
Numerator[j[z]] (* A226081 *)
Flatten[NestList[(# /. x_ /; x > 1 -> Sequence[x, 1/x - 1]) + 1 &, {1}, 9]] (* rabbit-ordered rationals, Danny Marmer, Dec 07 2014 *)
PROG
(PARI) A226080_vec(N=100)={my(T=[1], S=T, A=T); while(N>#A=concat(A, apply(denominator, T=select(t->!setsearch(S, t), concat(apply(t->[t+1, 1/t], T))))), S=setunion(S, Set(T))); A} \\ M. F. Hasler, Nov 30 2018
(PARI) (A226080(n)=denominator(RabbitOrderedRational(n))); ROR=List(1); RabbitOrderedRational(n)={if(n>#ROR, local(S=Set(ROR), i=#ROR*2\/(sqrt(5)+1), a(t)=setsearch(S, t)||S=setunion(S, [listput(ROR, t)])); until( type(ROR[i+=1])=="t_INT" && n<=#ROR, a(ROR[i]+1); a(1/ROR[i]))); ROR[n]} \\ M. F. Hasler, Nov 30 2018
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Clark Kimberling, May 25 2013
STATUS
approved