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

A272727 a(0)=0; thereafter a(n+1) is the number of coincidences between the sequence so far (a(0), ..., a(n)) and its reverse (a(n), ..., a(0)).

Original entry on oeis.org

0, 1, 0, 3, 0, 3, 0, 5, 0, 7, 0, 7, 0, 7, 0, 9, 0, 9, 0, 11, 0, 13, 0, 15, 0, 15, 0, 15, 0, 15, 0, 17, 0, 19, 0, 19, 0, 19, 0, 21, 0, 21, 0, 23, 0, 23, 0, 25, 0, 27, 0, 29, 0, 31, 0, 31, 0, 31, 0, 31, 0, 31, 0, 33, 0, 33, 0, 35, 0, 37, 0, 39, 0, 39, 0, 39, 0, 39, 0, 41, 0, 43
Offset: 0

Views

Author

Ivan Neretin, May 05 2016

Keywords

Comments

a(2n-1) is positive and odd.
a(2n+1) - a(2n-1) is always either 0 or 2.
The number of repetitions of the value 2n-1 is A272729(n).

Examples

			A one-element series [0] coincides with its own reverse, hence a(1)=1.
[0,1] and [1,0] differ in every term, hence a(2)=0.
[0,1,0] is its own reverse, hence a(3)=3.
[0,1,0,3] and [3,0,1,0] differ in every term, hence a(4)=0.
[0,1,0,3,0] and [0,3,0,1,0] coincide in three terms, hence a(5)=3.
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, Count[# - Reverse[#], x_ /; x == 0]] &, {0}, 81]

Formula

a(2n)=0.
a(2n-1)=A272728(n)+n.

A037988 Critical values in Conway's game of one-dimensional phutball.

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 11, 15, 16, 19, 21, 23, 24, 25, 26, 31, 33, 34, 35, 39, 40, 43, 44, 47, 49, 51, 53, 54, 55, 56, 57, 63, 64, 67, 69, 71, 72, 73, 74, 79, 81, 82, 83, 87, 89, 90, 91, 95, 96, 99, 100, 103, 104, 107, 109, 111, 113, 115, 116
Offset: 0

Views

Author

Keywords

Comments

The first player can move the ball 2*a(n) spaces before the second player can move the ball 2*(a(n-1) + 1) spaces.
A self-describing sequence. Pick any number n; this n says: "There are n terms in the sequence which are <= 2n". This sequence is the slowest increasing one with this property. - Eric Angelini, Jun 15 2007
Conjectured partial sums of A272729 (true for at least 8192 terms). - Sean A. Irvine, Jun 26 2022

References

  • Berlekamp, Conway and Guy, "Winning Ways", Volume 2. Academic Press, 1982

Crossrefs

Cf. A272729.

A094591 a(0) = 1; a(n) = n + (largest element of {a} <= n).

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 11, 12, 16, 17, 20, 22, 24, 25, 26, 27, 32, 34, 35, 36, 40, 41, 44, 45, 48, 50, 52, 54, 55, 56, 57, 58, 64, 65, 68, 70, 72, 73, 74, 75, 80, 82, 83, 84, 88, 90, 91, 92, 96, 97, 100, 101, 104, 105, 108, 110, 112, 114, 116, 117, 118, 119, 120, 121, 128, 130
Offset: 0

Views

Author

Leroy Quet, Jun 07 2004

Keywords

Comments

A self-describing sequence. Pick any number n; this n says: "There are n terms in the sequence which are < 2n". This sequence is the slowest increasing one with this property. See comments on A037988. - Eric Angelini, Jun 15 2007

Crossrefs

Programs

  • Mathematica
    Block[{a = {1}}, Do[AppendTo[a, i + Last@ TakeWhile[a, # <= i &]], {i, 65}]; a] (* Michael De Vlieger, Sep 04 2017 *)
  • Python
    def aupton(nn):
        alst = [1]
        for n in range(1, nn+1):
            alst.append(n + max(k for k in alst if k <= n))
        return alst
    print(aupton(65)) # Michael S. Branicky, Oct 28 2021

Formula

From Andrey Zabolotskiy, Oct 28 2021: (Start)
a(n) = A037988(n-1) + 1. [Conjectured by the original author, apparently proved by Eric Angelini.]
The first differences are A272729. [discovered by Sequence Machine] (End)

Extensions

More terms from Vladeta Jovovic, Jun 11 2004

A359807 a(1) = 0; thereafter a(n) is the largest a(i) + i which is < n among i = 1..n-1.

Original entry on oeis.org

0, 1, 1, 3, 4, 4, 4, 7, 7, 9, 10, 11, 11, 11, 11, 15, 16, 16, 16, 19, 19, 21, 21, 23, 24, 25, 26, 26, 26, 26, 26, 31, 31, 33, 34, 35, 35, 35, 35, 39, 40, 40, 40, 43, 44, 44, 44, 47, 47, 49, 49, 51, 51, 53, 54, 55, 56, 57, 57, 57, 57, 57, 57, 63, 64, 64, 64, 67, 67, 69, 69, 71, 72, 73, 74, 74, 74, 74, 74
Offset: 1

Views

Author

Neal Gersh Tolunsky, Jan 13 2023

Keywords

Comments

Critical values of Conway's game of one-dimensional phutball (A037988), except for the initial zero.
Conjectured run lengths are A272729, and the terms which occur here are partial sums of A272729.
The next distinct term here occurs at index a(i)+i+1 for every index i.

Examples

			For n=3, we see that for i=1 and 2, a(i)+i = 1 and 3, of which only 1 is < n=3, so that a(3)=1.
For n=5, i=1..4 have a(i)+i = 1,3,4,7 and the largest < n=5 is 4 so that a(5)=4.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 0; for (n=2, nn, va[n] = vecmax(select(x->(xMichel Marcus, Jan 31 2023
    
  • PARI
    { my (v = 0, m = 0); for (n = 1, 79, if (bittest(m, n-1), v = n-1); print1 (v", "); m = bitor(m, 2^(v+n))) } \\ Rémy Sigrist, Feb 08 2023

A153036 Integer parts of the full Stern-Brocot tree.

Original entry on oeis.org

0, 1, 0, 2, 0, 0, 1, 3, 0, 0, 0, 0, 1, 1, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 22 2008

Keywords

Examples

			a(1): 1;
a(2..3): 1x0, 2;
a(4..7): 2x0, 1x1, 3;
a(8..15): 4x0, 2x1, 1x2, 4;
a(16..31): 8x0, 4x1, 2x2, 1x3, 5;
a(32..63): 16x0, 8x1, 4x2, 2x3, 1x4, 6;
a(64..127): 32x0, 16x1, 8x2, 4x3, 2x4, 1x5, 7;
a(128..255): 64x0, 32x1, 16x2, 8x3, 4x4, 2x5, 1x6, 8;
a(256..511): 128x0, 64x1, 32x2, 16x3, 8x4, 4x5, 2x6, 1x7, 9.
		

Crossrefs

Cf. A130321.
If every block of terms of length 2^k is reversed, we get A290256; other permutations within these blocks give A007814 and A272729-1.

Formula

a(n+1) = floor(A007305(n+2)/A047679(n)). [Corrected by Andrey Zabolotskiy, Jul 23 2020]
a(n) = if n=2^k-1 then k else Log2(n)-1-Log2(2^(Log2(n)+1)-(n+1)), where Log2=A000523.
From Andrey Zabolotskiy, Oct 07 2021: (Start)
Formulas discovered by Sequence Machine (and also essentially by Kevin Ryde):
a(n) = A090996(n) - A043545(n).
a(n) = A007814(A145342(n+1)). (End)

Extensions

a(0) = 0 added by Andrey Zabolotskiy, Jul 23 2020

A272728 a(n) = A272727(2n-1) - n.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 0
Offset: 1

Views

Author

Ivan Neretin, May 05 2016

Keywords

Comments

a(n)>=0.
|a(n+1)-a(n)|=1.
All local minima occur where a(n)=0. Values at the local maxima are listed in A272729.
Empirically: The least n such that a(n) = k - 1 is n = 2^k - k. - Danny Rorabaugh, May 12 2016

Crossrefs

Programs

  • Mathematica
    nn = 120; s = Nest[Append[#, Count[# - Reverse[#], x_ /; x == 0]] &, {0}, 2 nn - 1]; Table[s[[2 n]] - n, {n, nn}] (* Michael De Vlieger, May 05 2016, after Ivan Neretin at A272727 *)

A293668 First differences of A292046.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Andrey Zabolotskiy, Oct 14 2017

Keywords

Comments

a(n) is also the length of n-th run of consecutive integers in the complement of A292046, starting from the 1st run "4, 5".
This sequence is invariant under the following transform: subtract 1 from every term, eliminate zeros. Other sequences with this property include A001511 and other generalized ruler functions, A002260, A272729.

Crossrefs

Programs

  • PARI
    A293668(n) = { my(k=1); while(n && !bitand(n,n-1),n = valuation(n,2); k++); (k); }; \\ Antti Karttunen, Sep 30 2018

Formula

a(0) = 1, a(n) = A292046(n+1)-A292046(n) for n>0.
If n = 2^k, a(n) = a(k)+1; otherwise a(n) = 1.
a(n) = A255308(n) + 1.
a(n) = O(log*(n)), where log* is the iterated logarithm. More precisely, a(n) <= A230864(n+1)+1.
Showing 1-7 of 7 results.