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.

A331624 Distinct values in A309681, in order of appearance.

Original entry on oeis.org

2, 4, 5, 6, 13, 9, 18, 19, 17, 20, 26, 30, 35, 23, 47, 50, 60, 41, 7, 42, 21, 37, 49, 38, 31, 44, 67, 55, 80, 79, 100, 106, 74, 29, 72, 65, 78, 101, 86, 99, 52, 77, 45, 75, 96, 141, 128, 105, 157, 180, 61, 182, 190, 135, 154, 121, 120, 146, 111, 27, 112, 158, 132, 28, 174
Offset: 1

Views

Author

Samuel B. Reid, Jan 22 2020

Keywords

Crossrefs

Cf. A309681.

A171922 For definition see Comments lines.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 6, 4, 2, 11, 6, 11, 2, 4, 12, 4, 16, 11, 12, 14, 16, 6, 24, 2, 29, 9, 29, 4, 24, 12, 32, 14, 24, 11, 16, 29, 23, 6, 38, 8, 41, 26, 32, 40, 38, 16, 24, 2, 41, 43, 41, 29, 42, 12, 9, 71, 4, 11, 35, 53, 6, 11, 24, 14, 71, 23, 9, 11, 32, 35, 47, 2, 58, 24, 58
Offset: 1

Views

Author

Hugo van der Sanden and N. J. A. Sloane, Oct 23 2010, Oct 24 2010

Keywords

Comments

Constructed in an attempt to find the lexicographically earliest sequence of positive integers, not all 1's, with the property that for n >= 2, if a(n-1) = k, then min(m : a(n+m) = a(n), m > 0) = k.
However, the sequence is well-defined, even if should fail to satisfy that property.
The sequence is constructed as follows:
1) Given a(n-1) = k, we require min(m : a(n+m) = a(n), m > 0) = k.
2) If a(1) = a(2) = 1, we find by induction that a(n) = 1 for all n, so this is forbidden.
3) For n > 1, if a(n) = k then a(n+b_n(i)) = k for all i, with b_n(0) = 0 and b_n(i+1) = b_n(i) + a(n+b_n(i)-1). Hence every such k appears infinitely often.
4) Hence any a(n) not forced to be equal to a previous a(m) must have some new, never-seen-before value (or violate (1)). Whether such force exists is completely determined by the a(m): 1 <= m < n.
5) We can fully characterize a valid sequence by C = [ c_i ], the distinct values that it takes in order of first appearance. We can then generate the original sequence using (1) and (4). The desired sequence is that generated by the lexically earliest C.
6) Given a(n) = k, we must avoid a(n+m) = k-m for all m > 0, else we would have a(n+1) = a(n+1+k) = a(n+m+1), violating (1).
7) Given known a(n-1) = x, a(n+1) = y and trying to find a(n) = k, we have a(n+1) = a(n+k+1) = y. So by (6) and (3) we must avoid b_n(i) = y+1 for all i.
We make the (unproved) assumption that defending against both (6) and (7) is sufficient to avoid backtracking. That appears to work, and produces the current sequence. The associated sequence C is A171921.
The sequence has the property that its forwards van Eck transform (see A171898) is the same sequence prefixed with 0. - N. J. A. Sloane, Oct 23 2010

Crossrefs

A332864 Lexicographically earliest sequence of positive integers with the property that the distance between the first appearance of n and the first appearance of n+1 is a(n).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 1, 5, 1, 1, 1, 6, 7, 8, 1, 1, 1, 1, 9, 10, 11, 12, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 1, 15, 16, 17, 18, 19, 1, 1, 1, 1, 1, 1, 1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 25, 26, 27, 28
Offset: 1

Views

Author

Samuel B. Reid, Feb 27 2020

Keywords

Crossrefs

Programs

  • C
    See Links section.
    
  • Python
    a = [1]
    for n in range(1, 30):
        a += [1] * (a[n-1]-1)
        a.append(n+1)
    print(a)
    # Andrey Zabolotskiy, Feb 28 2020

A319579 Lexicographically earliest infinite sequence of positive terms such that for any n >= 0, a(n+1) = a(n + a(n)) - a(n).

Original entry on oeis.org

2, 2, 4, 6, 2, 8, 10, 2, 6, 8, 2, 5, 7, 18, 14, 8, 12, 10, 2, 25, 27, 2, 18, 20, 2, 4, 6, 12, 22, 10, 24, 32, 18, 14, 15, 2, 5, 7, 45, 34, 38, 12, 3, 22, 52, 25, 2, 29, 31, 17, 32, 3, 53, 15, 56, 2, 2, 4, 6, 4, 46, 10, 10, 50, 10, 74, 49, 8, 71, 52, 27, 20, 60
Offset: 0

Views

Author

Marc Morgenegg, Aug 27 2019

Keywords

Comments

The smallest legal term is 2, otherwise for a(n) = 1: a(n+1) = a(n + 1) - 1.

Examples

			a(0) = 2, because it's the smallest positive integer that satisfies the rule a(n+1) = a(n + a(n)) - a(n).
a(1) = 2, because we have again free choice inside the rules.
a(2) = 4, because a(1) = a(0 + a(0)) - a(0) = a(0 + 2) - a(0) = a(2) - 2 = 2.
a(3) = 6, because a(2) = a(1 + a(1)) - a(1) = a(1 + 2) - a(1) = a(3) - 2 = 4.
a(6) = 10, because a(3) = a(2 + a(2)) - a(2) = a(2 + 4) - a(2) = a(6) - 4 = 6.
a(4) = 2, because we have again free choice inside the rules.
And so on.
		

Crossrefs

Cf. A309681.

Formula

a(n+1) = a(n + a(n)) - a(n).

Extensions

Name amended by Rémy Sigrist, Oct 01 2019
Showing 1-4 of 4 results.