A226136 Positions of the positive integers in the ordering of rational numbers as generated by the rules: 1 is in S, and if nonzero x is in S, then x+1 and -1/x are in S. (See Comments.)
1, 2, 4, 7, 10, 15, 22, 32, 47, 69, 101, 148, 217, 318, 466, 683, 1001, 1467, 2150, 3151, 4618, 6768, 9919, 14537, 21305, 31224, 45761, 67066, 98290, 144051, 211117, 309407, 453458, 664575, 973982
Offset: 1
Keywords
Examples
S' = (1/1, 2/1, -1/1, 3/1, -1/2, 0/1, 4/1, -1/3, 1/2, ...), with positive integers appearing in positions 1,2,4,7,...
Links
- Clark Kimberling, Table of n, a(n) for n = 1..35
Crossrefs
Cf. A226080 (rabbit ordering of positive rationals).
Programs
-
Mathematica
g[1] := {1}; z = 20; g[n_] := g[n] = DeleteCases[Flatten[Transpose[{# + 1, -1/#}]]&[DeleteCases[g[n - 1], 0]], Apply[Alternatives, Flatten[Map[g, Range[n - 1]]]]]; Flatten[Map[g, Range[7]]] (* ordered rationals *) Map[g, Range[z]]; Table[Length[g[i]], {i, 1, z}] (* cf A003410 *) f = Flatten[Map[g, Range[z]]]; Take[Denominator[f], 100] (* A226130 *) Take[Numerator[f], 100] (* A226131 *) p1 = Flatten[Table[Position[f, n], {n, 1, z}]] (* A226136 *) p2 = Flatten[Table[Position[f, -n], {n, 0, z}]]; Union[p1, p2] (* A226137 *) (* Peter J. C. Moses, May 26 2013 *)
Formula
Conjecture: a(n) = a(n-1)+a(n-3) for n>6. G.f.: -x*(x+1) * (x^2+1)^2 / (x^3+x-1). - Colin Barker, Jul 03 2013
Comments