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

A272729 a(n) is the number of repetitions of 2n-1 in A272727.

Original entry on oeis.org

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

Views

Author

Ivan Neretin, May 05 2016

Keywords

Comments

Also, value of A272728 at the n-th local maximum.
Also, the trajectory of 1 under the morphism n->[1,1..1,n+1] (the number of 1's is n-1).
Average value tends to 2.
Number n makes its first appearance at the position 2^(n-1) and has frequency 1/2^n.
Conjectured first differences of A037988 (true for at least 8192 terms). - Sean A. Irvine, Jun 26 2022

Examples

			The morphism acts as follows:
1->2; 2->1,3; 3->1,1,4; 4->1,1,1,5; etc.
The trajectory starts as:
1 ->
2 ->
1,3 ->
2,1,1,4 ->
1,3,2,2,1,1,1,5 -> ...
The result of k iterations is a series with 2^(k-1) terms; their sum is 2^k.
If A001511 is laid out in a similar irregular triangle, each row
would contain the same terms, albeit in a different order:
1,
2,
1,3,
1,2,1,4,
1,2,1,3,1,2,1,5...
		

Crossrefs

Programs

  • Mathematica
    Flatten@NestList[Flatten[Append[ConstantArray[1, # - 1], # + 1] & /@ #] &, {1}, 7]

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

A130011 A self-describing sequence. Pick any integer n in the sequence; this n says: "There are n terms in the sequence that are <= 3n". This sequence is the slowest increasing one with this property.

Original entry on oeis.org

1, 4, 5, 12, 15, 16, 17, 18, 19, 20, 21, 36, 37, 38, 45, 48, 51, 54, 57, 60, 63, 64, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Eric Angelini, Jun 15 2007

Keywords

Comments

See comments in A094591 and A037988.
It is not clear in what sense "slowest increasing" is meant in the description of this sequence. The definition requires that there be exactly a(k) terms <= 3 a(k), for any index k. Therefore, a(n+1) > 3n for all indices n of the form n = a(k). Thus, any such sequence has an infinite number of terms a(k) >= 3k-2. The lexicographically first variant A260107, which starts (1, 4, 5, 6, 13, 16, 19, 20, 21, 22, ...), also has all its terms a(k) <= 3k-2, so it cannot be said to increase faster. - M. F. Hasler, Jul 16 2015

A260107 Lexicographically first increasing sequence of positive integers such that there are exactly a(k) terms less than or equal to 3*a(k), for each k.

Original entry on oeis.org

1, 4, 5, 6, 13, 16, 19, 20, 21, 22, 23, 24, 25, 40, 41, 42, 49, 50, 51, 58, 61, 64, 67, 70, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 121, 124, 127, 128, 129, 130, 131, 132, 133, 148, 151, 154, 155, 156, 157, 158, 159, 160, 175, 176
Offset: 1

Views

Author

M. F. Hasler, Jul 16 2015

Keywords

Comments

See A130011 and A260139 for other variants of this self-describing sequence.

Crossrefs

Programs

  • Maple
    l:=[1, 4]:for n from 2 to 20 do for j from l[n-1]+1 to `if`(n=2, l[n]-1, l[n]) do l:=[op(l), max(3*l[n-1], op(l))+1]: od: od: l; # Nathaniel Johnston, Apr 27 2011
  • PARI
    a=vector(100,i,1);i=v=1;for(k=2,#a,if(k>a[i],v=3*a[i];i++);a[k]=v++)

Formula

a(n) <= 3n-2, and there are infinitely many indices (namely, all those of the form n = a(k)+1 for some k) for which equality holds.

A260139 For any term a(k), there are exactly a(k) terms strictly smaller than 3*a(k); this is the lexicographically first increasing sequence of nonnegative integers with this property.

Original entry on oeis.org

0, 2, 6, 7, 8, 9, 18, 21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 54, 55, 56, 63, 64, 65, 72, 73, 74, 81, 84, 87, 90, 93, 96, 99, 102, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 162, 165, 168, 169, 170, 171, 172
Offset: 0

Views

Author

M. F. Hasler, Jul 16 2015

Keywords

Comments

Suggested by Eric Angelini, cf. link to SeqFan post.
This sequence has a nice self-similar graph.

Examples

			The first term says that there are a(0) = 0 terms < 0.
Then it is not possible to go on with 1, since {0, 1} would be 2 terms < 3*1 = 3.
Thus we must have a(1) = 2 terms < 3*2 = 6; and since we already have {0, 2}, the next must be at least 6.
Therefore, a(2) = 6 is the number of terms < 3*6 = 18, so there must be 3 more:
We have a(3) = 7 terms < 21, a(4) = 8 terms < 24, a(5) = 9 terms < 27.
Now, in view of a(2), the sequence goes on with a(6) = 18 terms < 3*18. This was the 7th term, in view of a(3) the next must be >= 21:
We have a(7) = 21 terms <= 3*21, a(8) = 24 terms <= 3*24, a(9) = 27 terms <= 3*27. Then we can increase by 1 up to index 18:
a(10) = 28 terms <= 3*28, ..., a(17) = 35 terms <= 3*35. This was the 18th term, in view of a(6) the following terms must be >= 3*18 = 54 =: a(18).
		

Crossrefs

Cf. A260107, A130011 and references therein; A037988, A094591 (analogs with 2n instead of 3n).

Programs

  • PARI
    a=vector(100);a[i=2]=2;for(k=3,#a,a[k]=if(k>a[i],3*a[i++-1],a[k-1]+1))

Formula

a(n) <= 3n, with equality for indices of the form n = a(k) for some k.
Showing 1-6 of 6 results.