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

A371632 Lexicographically earliest sequence of positive integers such that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form a progression of the form p, p+q, p-q, where q >= 0.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 2, 4, 1, 3, 2, 1, 3, 2, 3, 4, 1, 2, 3, 4, 3, 4, 4, 5, 4, 1, 5, 5, 4, 1, 4, 2, 5, 5, 6, 5, 5, 6, 6, 7, 7, 3, 7, 6, 6, 8, 6, 6, 5, 7, 7, 8, 7, 1, 8, 8, 9, 9, 8, 5, 3, 9, 9, 10, 9, 6, 8, 8, 5, 9, 9, 5, 8, 6, 10, 1, 7, 10, 6, 6, 4, 4, 8, 3, 10
Offset: 1

Views

Author

Neal Gersh Tolunsky, May 24 2024

Keywords

Comments

This sequence avoids one of the six permutations of a set of three integers in arithmetic progression. For example, the set {1,2,3} can be ordered as tuples (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1). In this sequence, we avoid (2,3,1) and other progressions of the form p, p+q, p-q, for all q >= 0.

Crossrefs

A373010 Lexicographically earliest sequence of positive integers such that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form a progression of the form p, p-2*q, p-q, where q >= 0.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, May 22 2024

Keywords

Comments

This sequence avoids one of the six permutations of a set of three integers in arithmetic progression. For example, the set {1,2,3} can be ordered as tuples (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1). In this sequence, we avoid (3,1,2) and other progressions of the form p, p-2*q, p-q, for all q >= 0.

Crossrefs

Formula

a(n)=1 iff n in A003278.

A373052 Lexicographically earliest sequence of positive integers such that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form a weakly decreasing arithmetic progression.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, May 20 2024

Keywords

Crossrefs

Programs

  • PARI
    \\ See Links section.

A373111 Lexicographically earliest sequence of positive integers such that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form a progression of the form c, c+2d, c+d, where d >= 0.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, May 25 2024

Keywords

Comments

This sequence avoids one of the six permutations of a set of three integers in arithmetic progression. For example, the set {1,2,3} can be ordered as tuples (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1). In this sequence, we avoid (1,3,2) and other progressions of the form c, c+2d, c+d, for all d >= 0.

Crossrefs

Formula

a(n)=1 iff n in A003278.

A330267 Lexicographically earliest sequence of nonnegative terms such that for any n > 0 and k > 0, a(n+2*k) <> max(a(n), a(n+k)).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Dec 21 2019

Keywords

Crossrefs

Cf. A003278 (positions of 0's).
See A229037, A268811, A276204, A309890, A317805, A361933, A364057 for similar sequences.
See A330622, A330623 and A330629 for other variants.

Programs

  • C
    See Links section.

Formula

a(n) = 0 iff n belongs to A003278.

A371457 Lexicographically earliest sequence of positive integers such that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form a progression of the form p, p-q, p+q, where q >= 0.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 4, 3, 2, 6, 5, 5, 6, 3, 4, 3, 4, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 1, 1, 2, 2, 6, 4, 2, 4, 6, 8, 6, 5, 8, 4, 6, 2, 7, 5, 11, 5, 5, 7, 6, 11, 4, 9, 6, 7, 9, 7, 5, 4, 3, 8, 9, 5, 5, 8, 3, 5, 3, 3, 1, 1, 2, 1, 1, 2
Offset: 1

Views

Author

Neal Gersh Tolunsky, Jun 01 2024

Keywords

Comments

This sequence avoids one of the six permutations of a set of three integers in arithmetic progression. For example, the set {1,2,3} can be ordered as tuples (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1). In this sequence, we avoid (2,1,3) and other progressions of the form p, p-q, p+q, for all q >= 0.

Crossrefs

Formula

a(n)=1 iff n in A003278.

A367196 Lexicographically earliest sequence such that for any distinct j, k, m that are the side lengths of a triangle, a(j), a(k), and a(m) are not the side lengths of a triangle.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 5, 1, 8, 13, 21, 2, 34, 55, 89, 1, 144, 233, 4, 377, 610, 987, 1597, 1, 17, 2584, 4181, 6765, 10946, 17711, 3, 72, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 1, 7, 305, 832040, 1346269, 2178309, 3524578, 41, 5702887, 1292, 9227465
Offset: 1

Views

Author

Neal Gersh Tolunsky, Nov 09 2023

Keywords

Comments

In a triangle, the sum of any two side lengths is greater than that of the third, so that x + y > z. The empty triangle (or line) is not counted, which means that x + y cannot be equal to z. In practice, if we have two side lengths x and y, we can find their sum s and their difference d, which tells us that side z must fall in the range d < z < s to form a triangle.
For n>0, A002620(n+1) gives the number of combinations of three indices whose corresponding terms cannot be the side lengths of a triangle in this sequence.
It appears that the local maxima are the Fibonacci numbers A000045 (except for 1s).
The second-largest values in the log graph, falling roughly on a line, appear to be A001076 (half of the even Fibonacci numbers).
Generalizing the sequence to prohibit the side lengths of any n-gon at distinct n-gonal indices gives A011782.

Examples

			a(3)=1 because the indices 1,2,3 could not be the side lengths of a triangle, so there is no restriction and the smallest number is chosen.
a(7) cannot be 1 because a(3)=1, a(5)=1, and a(7)=1 could be the side lengths of a triangle at indices which are also side lengths of a triangle.
a(7) cannot be 2 because a(4)=2, a(6)=3, and a(7)=2 are side lengths of a triangle at indices that forbid it.
a(7) cannot be 3 because a(5)=1, a(6)=3, and a(7)=3 also make a triangle at indices that forbid it.
a(7) cannot be 4 because a(4)=2, a(6)=3 and a(7)=4 form a triangle at unsuitable indices.
a(7) can be 5 without contradiction, so a(7)=5.
		

Crossrefs

Cf. A316841, A070080 (triangle side lengths).

Programs

  • MATLAB
    See Links.

Extensions

a(11)-a(50) from Samuel Harkness, Nov 13 2023

A381629 Lexicographically earliest sequence of positive integers such that no subsequence of terms at indices in arithmetic progression form an arithmetic progression in any order.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 4, 4, 1, 1, 2, 1, 1, 2, 2, 4, 4, 2, 4, 4, 5, 5, 8, 5, 5, 9, 9, 4, 2, 5, 11, 2, 2, 4, 1, 1, 5, 1, 1, 10, 2, 2, 4, 1, 1, 4, 4, 10, 10, 4, 10, 10, 12, 2, 4, 1, 2, 5, 4, 5, 10, 4, 2, 8, 2, 10, 5, 5, 10, 5, 13, 12, 13, 2, 5, 10, 5, 10, 10, 13, 5
Offset: 1

Views

Author

Neal Gersh Tolunsky, Mar 29 2025

Keywords

Comments

First differs from A361933 at a(52).
This is a variant of A361933 generalized to arithmetic progressions of any nontrivial length (3 or greater).

Examples

			a(52) cannot be values 1-7 without creating an arithmetic progression. a(52) cannot be 8 because the terms at i = 22,32,42,52 (common difference 10) would have the terms 5,11,2,8, which, rearranged, form the progression 2,5,8,11 (common difference 3). a(52) cannot be 9 because the terms at i = 38,45,52 (common difference 7) would have the terms 5,1,9, which in the order 1,5,9 form an arithmetic progression (common difference 4). So a(52) = 10.
		

Crossrefs

Cf. A361933.

A382559 a(n) is the length of the longest subsequence at indices in arithmetic progression ending at a(n-1) whose terms form an arithmetic progression in some order; a(1)=1.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Apr 01 2025

Keywords

Comments

First differs from A362881 at a(15).
This is a variant of A362881 in which the terms of an arithmetic progression can occur in any order.

Examples

			a(21) = 4: The subsequence at indices i = 2,8,14,20 (common difference 6) is {1,3,2,4} which can be rearranged to form the arithmetic progression {1,2,3,4}. We find that the longest such subsequence ending at a(20) has length 4, so a(21) = 4.
		

Crossrefs

Showing 1-9 of 9 results.