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.

Previous Showing 11-20 of 42 results. Next

A245220 Decimal expansion of inf{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A022838, else f(n,x) = 1/x.

Original entry on oeis.org

3, 6, 7, 5, 4, 3, 4, 9, 1, 1, 8, 4, 9, 5, 1, 2, 4, 8, 7, 2, 1, 2, 6, 0, 9, 7, 2, 5, 4, 1, 0, 9, 2, 5, 4, 0, 7, 0, 8, 3, 4, 4, 0, 8, 8, 6, 0, 5, 2, 0, 6, 3, 6, 5, 9, 3, 6, 0, 9, 1, 7, 8, 7, 0, 4, 6, 9, 2, 5, 9, 5, 1, 9, 7, 4, 4, 3, 5, 6, 0, 6, 2, 5, 8, 0, 2
Offset: 1

Views

Author

Clark Kimberling, Jul 14 2014

Keywords

Comments

See Comments at A245215.

Examples

			c = 0.367543491184951248721260972541092540...  The first 12 numbers f(n,1) comprise S(12) = {1, 2, 1/2, 3/2, 2/3, 5/3, 8/3, 3/8, 11/8, 8/11, 19/11, 11/19}; min(S(12)) = 3/8 = 0.375... and max(S(12)) = 8/3 = 2.666...
		

Crossrefs

Cf. A226080 (infinite Fibonacci tree), A245215, A245217, A245221, A245222.

Programs

  • Mathematica
    tmpRec = $RecursionLimit; $RecursionLimit = Infinity; u[x_] := u[x] = x + 1; d[x_] := d[x] = 1/x; r = Sqrt[3]; w = Table[Floor[k*r], {k, 2000}]; s[1] = 1; s[n_] := s[n] = If[MemberQ[w, n - 1], u[s[n - 1]], d[s[n - 1]]]; $RecursionLimit = tmpRec;
    m = Min[N[Table[s[n], {n, 1, 4000}], 300]]
    t = RealDigits[m]  (* A245220 *)
    (* Peter J. C. Moses, Jul 04 2014 *)

Formula

a(n)*sup{f(n,1)} = 1.

A242359 Irregular triangular array of denominators of the positive rational numbers ordered as in Comments.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 07 2014

Keywords

Comments

Decree that row 1 is (1) and row 2 is (2). For n >=3, row n consists of numbers in decreasing order generated as follows: x+1 for each x in row n-1 together with 1/(1+x) for each x in row n-2. It is easy to prove that row n consists of F(n) numbers, where F = A000045 (the Fibonacci numbers), and that every positive rational number occurs exactly once.

Examples

			First 6 rows of the array of rationals:
1/1
2/1
3/1 ... 1/2
4/1 ... 3/2 ... 1/3
5/1 ... 5/2 ... 4/3 ... 2/3 ... 1/4
6/1 ... 7/2 ... 7/3 ... 5/3 ... 5/4 ... 3/4 ... 2/5 ... 1/5
The denominators, by rows:  1,1,1,2,1,2,3,1,2,3,3,4,1,2,3,3,4,4,5,5.
		

Crossrefs

Programs

  • Mathematica
    z = 12; g[1] = {1}; f1[x_] := x + 1; f2[x_] := 1/x; h[1] = g[1]; b[n_] := b[n] = DeleteDuplicates[Union[f1[g[n - 1]], f2[g[n - 1]]]];
    h[n_] := h[n] = Union[h[n - 1], g[n - 1]]; g[n_] := g[n] = Complement [b[n], Intersection[b[n], h[n]]]; t = Table[Reverse[g[n]], {n, 1, z}]
    Denominator[Flatten[t]] (* A242359 *)
    Numerator[Flatten[t]]   (* A242360 *)

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.)

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if nonzero x is in S, then x + 1 and -1/x are in S. Then S is the set of all rational numbers, produced in generations as follows: g(1) = (1), g(2) = (2, -1), g(3) = (3, -1/2, 0), g(4) = (4, -1/3, 1/2), ... For n > 4, once g(n-1) = (c(1), ..., c(z)) is defined, g(n) is formed from the vector (c(1)+1, -1/c(1), c(2)+1, -1/c(2), ..., c(z)+1, -1/c(z)) by deleting previously generated elements. Let S' denote the sequence formed by concatenating the generations.
A226130: Denominators of terms of S'
A226131: Numerators of terms of S'
A226136: Positions of positive integers in S'
A226137: Positions of integers in S'

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

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

A233694 Position of n in the sequence (or tree) S generated in order by these rules: 0 is in S; if x is in S then x + 1 is in S; if nonzero x is in S then 1/x is in S; if x is in S, then i*x is in S; where duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 5, 11, 23, 49, 102, 212, 443, 926, 1939, 4064, 8509, 17816, 37303, 78105, 163544, 342454, 717076, 1501502, 3144024, 6583334, 13784969
Offset: 0

Views

Author

Clark Kimberling, Dec 19 2013

Keywords

Comments

It can be proved using the division algorithm for Gaussian integers that S is the set of Gaussian rational numbers: (b + c*i)/d, where b,c,d are integers and d is not 0.
The differences of this sequence give the number of elements in each level of the tree. This means that d(n) = a(n) - a(n-1) is at least 1, and is bounded by 3*d(n-1), since there are three times as many elements in each level, before we exclude repetitions. - Jack W Grahl, Aug 10 2018

Examples

			The first 16 numbers generated are as follows: 0, 1, 2, i, 3, 1/2, 2 i, 1 + i, -i, -1, 4, 1/3, 3 i, 3/2, i/2, 1 + 2 i. The positions of the nonnegative integers are 1, 2, 3, 5, 11.
		

Crossrefs

Programs

  • Mathematica
    Off[Power::infy]; x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 1/x, I*x} /. ComplexInfinity -> 0]]], {18}]; On[Power::infy]; t1 = Flatten[Position[x, _?(IntegerQ[#] && NonNegative[#] &)]]    (* A233694 *)
    t2 = Flatten[Position[x, _?(IntegerQ[#] && Negative[#] &)]]  (* A233695 *)
    t = Union[t1, t2]  (* A233696 *)
    (* Peter J. C. Moses, Dec 21 2013 *)

Extensions

More terms from Jack W Grahl, Aug 10 2018

A233696 Positions of integers in the sequence (or tree) S generated in order by these rules: 0 is in S; if x is in S then x + 1 is in S; if nonzero x is in S then 1/x is in S; if x is in S, then i*x is in S; where duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 5, 10, 11, 18, 23, 30, 49, 56, 102, 109, 212, 219, 443, 450, 926, 933, 1939, 1946, 4064, 4071, 8509, 8516, 17816, 17823, 37303, 37310, 78105, 78112, 163544, 163551
Offset: 1

Views

Author

Clark Kimberling, Dec 19 2013

Keywords

Comments

It can be proved using the division algorithm for Gaussian integers that S is the set of Gaussian rational numbers: (b + c*i)/d, where b,c,d are integers and d is not 0.

Examples

			The first 16 numbers generated are as follows:  0, 1, 2, i, 3, 1/2, 2 i, 1 + i, -i, -1, 4, 1/3, 3 i, 3/2, i/2, 1 + 2 i.  Positions of integers 0, 1, 2, 3, -1, 4,... are 1,2,3,5,10,11,....
		

Crossrefs

Programs

  • Mathematica
    Off[Power::infy]; x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 1/x, I*x} /. ComplexInfinity -> 0]]], {18}]; On[Power::infy]; t1 = Flatten[Position[x, _?(IntegerQ[#] && NonNegative[#] &)]]    (*A233694*)
    t2 = Flatten[Position[x, _?(IntegerQ[#] && Negative[#] &)]]  (*A233695*)
    t = Union[t1, t2]  (*A233696*)
    (* Peter J. C. Moses, Dec 21 2013 *)

Extensions

Definition and example corrected. - R. J. Mathar, May 06 2017

A245223 Decimal expansion of inf{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A054385, else f(n,x) = 1/x.

Original entry on oeis.org

3, 6, 9, 3, 0, 6, 3, 9, 6, 4, 5, 3, 0, 1, 2, 3, 0, 5, 9, 7, 2, 7, 8, 1, 6, 9, 3, 6, 8, 7, 1, 9, 0, 6, 6, 9, 4, 4, 5, 6, 3, 1, 3, 3, 1, 6, 9, 0, 3, 8, 4, 9, 6, 0, 5, 3, 1, 0, 9, 1, 0, 0, 2, 8, 8, 6, 3, 3, 4, 6, 9, 2, 4, 5, 3, 0, 2, 7, 0, 1, 2, 6, 2, 9, 8, 0
Offset: 1

Views

Author

Clark Kimberling, Jul 14 2014

Keywords

Comments

See Comments at A245215.

Examples

			c = 0.36930639645301230597278169368719066944...  The first 16 numbers f(n,1) comprise S(16) = {1, 2, 1/2, 3/2, 5/2, 2/5, 7/5, 12/5, 5/12, 17/12, 12/17, 29/17}; min(S(16)) = 17/46 = 0.36956... and max(S(12)) = 46/17 = 2.7058...
		

Crossrefs

Cf. A226080 (infinite Fibonacci tree), A245215, A245217, A245220, A245224.

Programs

  • Mathematica
    tmpRec = $RecursionLimit; $RecursionLimit = Infinity; u[x_] := u[x] = x + 1; d[x_] := d[x] = 1/x; r = E/(E-1); w = Table[Floor[k*r], {k, 2000}]; s[1] = 1; s[n_] := s[n] = If[MemberQ[w, n - 1], u[s[n - 1]], d[s[n - 1]]]; $RecursionLimit = tmpRec;
    m = Min[N[Table[s[n], {n, 1, 4000}], 300]]
    RealDigits[m]  (* A245223 *)
    (* Peter J. C. Moses, Jul 04 2014 *)

Formula

a(n)*sup{f(n,1)} = 1.

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

A226137 Positions of the 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.)

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 10, 14, 15, 22, 32, 46, 47, 69, 101, 147, 148, 217, 318, 465, 466, 683, 1001, 1466, 1467, 2150, 3151, 4617, 4618, 6768, 9919, 14536, 14537, 21305, 31224, 45760, 45761, 67066, 98290, 144050, 144051, 211117, 309407, 453457, 453458
Offset: 1

Views

Author

Clark Kimberling, May 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if nonzero x is in S, then x + 1 and -1/x are in S. Then S is the set of all rational numbers, produced in generations as follows: g(1) = (1), g(2) = (2, -1), g(3) = (3, -1/2, 0), g(4) = (4, -1/3, 1/2), ... For n > 4, once g(n-1) = (c(1), ..., c(z)) is defined, g(n) is formed from the vector (c(1)+1, -1/c(1), c(2)+1, -1/c(2), ..., c(z)+1, -1/c(z)) by deleting previously generated elements. Let S' denote the sequence formed by concatenating the generations.
A226130: Denominators of terms of S'
A226131: Numerators of terms of S'
A226136: Positions of positive integers in S'
A226137: Positions of integers in S'

Examples

			S'= (1/1, 2/1, -1/1, 3/1, -1/2, 0/1, 4/1, -1/3, 1/2, ...), with integers appearing in positions 1,2,3,4,6,7,...
		

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 *)

A233695 a(n) gives the position of -n in the sequence (or tree) S generated in order by these rules: 0 is in S; if x is in S then x + 1 is in S; if nonzero x is in S then 1/x is in S; if x is in S, then i*x is in S; where duplicates are deleted as they occur.

Original entry on oeis.org

10, 18, 30, 56, 109, 219, 450, 933, 1946, 4071, 8516, 17823, 37310, 78112, 163551, 342461, 717083, 1501509, 3144031, 6583341, 13784976
Offset: 1

Views

Author

Clark Kimberling, Dec 19 2013

Keywords

Comments

It can be proved using the division algorithm for Gaussian integers that S is the set of Gaussian rational numbers: (b + c*i)/d, where b,c,d are integers and d is not 0.
Empirically, it appears that a(n) = A233694(n+2) + 7 for n > 2. It seems clear that positive integers appear for the first time at the start of a new level of the tree. If this is always the case, then the row starting with n will be followed by a row starting n+1, 1/n, ni, followed by a row starting n+2, 1/(n+1), (n+1)i, 1+1/n, n+1, i/(n+1), 1+ni, -i/n, -n. It may be possible to show that of these 9 values, only n+1 has ever appeared before. If so, then -n will always appear exactly 7 places after n + 2 in the sequence. - Jack W Grahl, Aug 10 2018

Examples

			The first 16 numbers generated are as follows:  0, 1, 2, i, 3, 1/2, 2 i, 1 + i, -i, -1, 4, 1/3, 3 i, 3/2, i/2, 1 + 2 i. -1 appears in the 10th place, so a(1) = 10.
		

Crossrefs

Programs

  • Mathematica
    Off[Power::infy]; x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 1/x, I*x} /. ComplexInfinity -> 0]]], {18}]; On[Power::infy]; t1 = Flatten[Position[x, _?(IntegerQ[#] && NonNegative[#] &)]]   (*A233694*)
    t2 = Flatten[Position[x, _?(IntegerQ[#] && Negative[#] &)]] (* A233695 *)
    t = Union[t1, t2]  (* A233696 *)
    (* Peter J. C. Moses, Dec 21 2013 *)

Extensions

More terms by Jack W Grahl, Aug 10 2018

A242360 Irregular triangular array of numerators of the positive rational numbers ordered as in Comments.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 07 2014

Keywords

Comments

Decree that row 1 is (1) and row 2 is (2). For n >=3, row n consists of numbers in decreasing order generated as follows: x+1 for each x in row n-1 together with 1/(1+x) for each x in row n-2. It is easy to prove that row n consists of F(n) numbers, where F = A000045 (the Fibonacci numbers), and that every positive rational number occurs exactly once.

Examples

			First 6 rows of the array of rationals:
1/1
2/1
3/1 ... 1/2
4/1 ... 3/2 ... 1/3
5/1 ... 5/2 ... 4/3 ... 2/3 ... 1/4
6/1 ... 7/2 ... 7/3 ... 5/3 ... 5/4 ... 3/4 ... 2/5 ... 1/5
The numeratorss, by rows:  1,2,3,1,4,3,1,5,5,4,2,1,6,7,7,5,5,3,2,1.
		

Crossrefs

Programs

  • Mathematica
    z = 12; g[1] = {1}; f1[x_] := x + 1; f2[x_] := 1/x; h[1] = g[1]; b[n_] := b[n] = DeleteDuplicates[Union[f1[g[n - 1]], f2[g[n - 1]]]];
    h[n_] := h[n] = Union[h[n - 1], g[n - 1]]; g[n_] := g[n] = Complement [b[n], Intersection[b[n], h[n]]]; t = Table[Reverse[g[n]], {n, 1, z}]
    Denominator[Flatten[t]] (* A242359 *)
    Numerator[Flatten[t]]   (* A242360 *)
Previous Showing 11-20 of 42 results. Next