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-3 of 3 results.

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

A139420 a(n) = length of n-th run of consecutive numbers in A136120.

Original entry on oeis.org

1, 3, 2, 2, 5, 2, 6, 2, 7, 2, 2, 2, 2, 11, 2, 12, 2, 2, 2, 2, 2, 17, 2, 18, 2, 2, 2, 2, 2, 2, 24, 2, 25, 2, 26, 2, 27, 2, 28, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 38, 2, 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 2, 51, 2, 52, 2, 53, 2, 54, 2, 55, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71, 2, 72, 2, 2, 2
Offset: 1

Views

Author

Klaus Brockhaus, Apr 22 2008

Keywords

Examples

			A136120 starts 1, 3, 4, 5, 9, 10, 15, ..., so a(1) = 1, a(2) = 3, a(3) = 2.
		

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 = 29800; Length /@Split[FixedPoint[f, Range[len]], #2 - #1 == 1 &]  (* Jayanta Basu, Jun 15 2013 - using the Mma program in A136120 *)

A139418 Complement of A136120.

Original entry on oeis.org

2, 6, 7, 8, 11, 12, 13, 14, 17, 18, 19, 20, 21, 27, 28, 29, 30, 31, 32, 33, 34, 35, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 94, 95, 96, 97, 98, 99, 100, 101
Offset: 1

Views

Author

Klaus Brockhaus, Apr 22 2008

Keywords

Comments

k-th run of consecutive numbers has length A136120(k).

Examples

			A136120 starts 1, 3, 4, 5, 9, 10, 15, ..., so sequence starts 2, 6, 7, 8, 11, 12, ... .
		

Crossrefs

Showing 1-3 of 3 results.