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.

A226081 Numerators in the Fibonacci (or rabbit) ordering of the positive rational numbers.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 3, 5, 1, 4, 5, 2, 6, 1, 5, 7, 3, 7, 2, 5, 7, 1, 6, 9, 4, 10, 3, 7, 9, 2, 7, 8, 3, 8, 1, 7, 11, 5, 13, 4, 9, 13, 3, 10, 11, 4, 11, 2, 9, 12, 5, 11, 3, 8, 9, 1, 8, 13, 6, 16, 5, 11, 17, 4, 13, 14, 5, 16, 3, 13, 17, 7, 15, 4, 11, 13, 2, 11, 16
Offset: 1

Views

Author

Clark Kimberling, May 25 2013

Keywords

Comments

See A226080.

Examples

			The numerators 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, ...
		

Crossrefs

Cf. A226080.

Programs

  • Mathematica
    z = 13; d[s_List, t_List] := Part[s, Sort[Flatten[Map[Position[s, #] &, Complement[s, t]]]]]; g[1] = {1}; g[2] = {2}; Do[ g[n] = d[Riffle[g[n - 1] + 1, 1/g[n - 1]], g[n - 2]], {n, 3, z}];  (* Edited by M. F. Hasler, Nov 30 2018 *)
    j[1] = g[1]; j[n_] := Join[j[n - 1], g[n]]; j[z];  (* rabbit-ordered rationals *)
    Denominator[j[z]]   (* A226080 *)
    Numerator[j[z]]     (* A226081 *)
  • PARI
    A226081_vec(N=100)={my(T=[1], S=T, A=T); while(N>#A=concat(A, apply(numerator, 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
    A226081(n)=numerator(RabbitOrderedRational(n)) \\ See A226080. - M. F. Hasler, Nov 30 2018