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.

Showing 1-4 of 4 results.

A138900 First gap of length at least n in A136110, lower end.

Original entry on oeis.org

1, 9, 18, 38, 98, 384, 2580, 2580, 2580, 2580, 2580, 367574, 721449, 3879720, 3879720, 53671968, 53671968, 223610114
Offset: 1

Views

Author

Klaus Brockhaus, Apr 03 2008

Keywords

Examples

			First few terms of A136110 are 1,3,4,6,7,9,12,13,15,17,18,22,23,... . The first gap of length 1 is between 1 and 3, hence a(1) = 1; the first gap of length 2 is between 9 and 12, hence a(2) = 9; the first gap of length 3 is between 18 and 22, hence a(3) = 18. The first gap of length at least 7 is between 2580 and 2592; it has length 11,
hence a(7) = a(8) = a(9) = a(10) = a(11) = 2580.
		

Crossrefs

Extensions

a(14)-a(18) from Donovan Johnson, Nov 27 2010

A138899 First term of the first run of at least n consecutive numbers in A136110.

Original entry on oeis.org

1, 3, 22, 174, 174, 284, 3174, 5929, 11724, 54924, 1015528, 1015528, 1015528, 39282392, 165885026
Offset: 1

Views

Author

Klaus Brockhaus, Apr 03 2008

Keywords

Examples

			First few terms of A136110 are 1,3,4,6,7,9,12,13,15,17,18,22,23,24,28,... . The first run of at least three consecutive numbers is 22,23,24. Hence a(3) = 22.
		

Crossrefs

Extensions

a(14)-a(15) from Donovan Johnson, Nov 27 2010

A136119 Limiting sequence when we start with the positive integers (A000027) and delete in step n >= 1 the term at position n + a(n).

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 10, 11, 13, 14, 15, 17, 18, 20, 21, 22, 24, 25, 27, 28, 29, 31, 32, 34, 35, 37, 38, 39, 41, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 56, 58, 59, 61, 62, 63, 65, 66, 68, 69, 71, 72, 73, 75, 76, 78, 79, 80, 82, 83, 85, 86, 87, 89, 90, 92, 93, 95, 96, 97, 99, 100
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 16 2008

Keywords

Comments

Apparently a(n) = A001953(n-1)+1 = floor((n-1/2)*sqrt(2))+1 (confirmed for n < 20000) and a(n+1) - a(n) = A001030(n). From the definitions these conjectures are by no means obvious. Can they be proved? - Klaus Brockhaus, Apr 15 2008 [For an affirmative answer, see the Cloitre link.]
This is the s(n)-Wythoff sequence for s(n)=2n-1; see A184117 for the definition. Complement of A184119. - Clark Kimberling, Jan 09 2011

Examples

			First few steps are:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 1; delete term at position 1+a(1) = 2: 2;
1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 2; delete term at position 2+a(2) = 5: 6;
1,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 3; delete term at position 3+a(3) = 7: 9;
1,3,4,5,7,8,10,11,12,13,14,15,16,17,18,19,20,...
n = 4; delete term at position 4+a(4) = 9: 12;
1,3,4,5,7,8,10,11,13,14,15,16,17,18,19,20,...
n = 5; delete term at position 5+a(5) = 12: 16;
1,3,4,5,7,8,10,11,13,14,15,17,18,19,20,...
n = 6; delete term at position 6+a(6) = 14: 19;
1,3,4,5,7,8,10,11,13,14,15,17,18,20,...
		

References

  • B. Cloitre, The golden sieve, preprint 2008

Crossrefs

Cf. A000027, A001953 (floor((n+1/2)*sqrt(2))), A001030 (fixed under 1 -> 21, 2 -> 211), A136110, A137292.
Cf. A242535.
Cf. A000217 (T).

Programs

  • Haskell
    import Data.List (delete)
    a136119 n = a136119_list !! (n-1)
    a136119_list = f [1..] where
       f zs@(y:xs) = y : f (delete (zs !! y) xs)
    -- Reinhard Zumkeller, May 17 2014
    
  • Magma
    [Ceiling((n-1/2)*Sqrt(2)): n in [1..100]]; // Vincenzo Librandi, Jul 01 2019
    
  • Mathematica
    f[0] = Range[100]; f[n_] := f[n] = Module[{pos = n + f[n-1][[n]]}, If[pos > Length[f[n-1]], f[n-1], Delete[f[n-1], pos]]]; f[1]; f[n = 2]; While[f[n] != f[n-1], n++]; f[n] (* Jean-François Alcover, May 08 2019 *)
    T[n_] := n (n + 1)/2; Table[1 + 2 Sqrt[T[n-1]] , {n, 1, 71}] // Floor (* Ralf Steiner, Oct 23 2019 *)
  • PARI
    apply( {A136119(n)=sqrtint(n*(n-1)*2)+1}, [1..99]) \\ M. F. Hasler, Jul 04 2022

Formula

a(n) = ceiling((n-1/2)*sqrt(2)). This can be proved in the same way as the formula given for A099267. There are some generalizations. For instance, it is possible to consider "a(n)+K*n" instead of "a(n)+n" for deleting terms where K=0,1,2,... is fixed. The constant involved in the Beatty sequence for the sequence of deleted terms then depends on K and equals (K + 1 + sqrt((K+1)^2 + 4))/2. K=0 is related to A099267. 1+A001954 is the complement sequence of this sequence A136119. - Benoit Cloitre, Apr 18 2008
a(n) = floor(1 + 2*sqrt(T(n-1))), with triangular numbers T(). - Ralf Steiner, Oct 23 2019
Lim_{n->inf}(a(n)/(n - 1)) = sqrt(2), with {a(n)/(n - 1)} decreasing. - Ralf Steiner, Oct 24 2019

Extensions

Edited and extended by Klaus Brockhaus, Apr 15 2008
An incorrect g.f. removed by Alois P. Heinz, Dec 14 2012

A136120 Limiting sequence when we start with the positive integers (A000027) and at step n >= 1 delete the a(n) terms at positions n+a(n) to n-1+2*a(n).

Original entry on oeis.org

1, 3, 4, 5, 9, 10, 15, 16, 22, 23, 24, 25, 26, 36, 37, 48, 49, 50, 51, 52, 53, 69, 70, 87, 88, 89, 90, 91, 92, 93, 116, 117, 141, 142, 167, 168, 194, 195, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 269, 270, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 16 2008

Keywords

Examples

			First few steps are:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 1, a(1) = 1; delete terms at positions 2 to 2; this is 2;
1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 2,a(2) = 3; delete terms at positions 5 to 7; these are 6,7,8;
1,3,4,5,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
n = 3, a(3) = 4; delete terms at positions 7 to 10; these are 11,12,13,14;
1,3,4,5,9,10,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
n = 4, a(4) = 5; delete terms at positions 9 to 13; these are 17,18,19,20,21;
1,3,4,5,9,10,15,16,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36...
n = 5 a(5) = 9; delete terms at positions 14 to 22; these are 27,28,29,30,31,32,33,34,35;
1,3,4,5,9,10,15,16,22,23,24,25,26,36,...
		

Crossrefs

Programs

  • Mathematica
    f[seq_] := Module[{s = seq, n1, n2}, n++; n1 = s[[n]] + n; If[n1 <= len, n2 = Min[n - 1 + 2*s[[n]], len]; len -= n2 - n1 + 1; Drop[s, {n1, n2}], s]]; n = 0; len = 1000; FixedPoint[f, Range[len]] (* Jean-François Alcover, Sep 29 2011 *)

Extensions

Edited and extended by Klaus Brockhaus, Apr 20 2008
Showing 1-4 of 4 results.