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.

A281900 Index of first occurrence of n in A281579, or -1 if n does not appear there..

Original entry on oeis.org

1, 3, 6, 7, 15, 16, 34, 240, 241, 317, 502, 503, 504, 505, 1077, 1178, 1179, 1806, 4866, 4901, 4902, 4946, 4947, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8203, 8204, 45393, 45485, 45486, 96358, 96359, 96360, 96361, 96362, 96363, 96364, 96365, 96366
Offset: 2

Views

Author

Rémy Sigrist, Feb 01 2017

Keywords

Comments

The sequence is strictly increasing.
It is conjectured that every number >= 2 does appear in A281579.
a(n) is also the index of the first occurrence of n-1 in A380317, or -1 if n-1 does not appear there.

Crossrefs

Extensions

Escape clause added to definition by N. J. A. Sloane, Feb 17 2025

A281772 a(n)=common difference of the n-th run of consecutive terms in arithmetic progression in A281579.

Original entry on oeis.org

0, 1, 0, 1, -1, 0, 1, -1, 0, -1, 0, 1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, -2, 0, 1, 0, 1, -1, 0, 1, -1, 0, 1, 0, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, 0, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -4, 0, 1, -1, 0, 1, 0, 1, -2, 0, 1, -1, 0, 1
Offset: 1

Views

Author

Rémy Sigrist, Jan 29 2017

Keywords

Comments

All terms are less than or equal to 1, and a(n)=1 implies a(n-1)=0.
There are no consecutive equal terms.

Crossrefs

A281783 a(n)=index of first term of n-th run of consecutive terms in arithmetic progression in A281579.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 12, 16, 19, 21, 23, 25, 27, 30, 34, 39, 45, 50, 54, 57, 60, 63, 65, 66, 67, 68, 70, 73, 76, 79, 82, 86, 91, 97, 104, 110, 115, 119, 122, 124, 126, 128, 130, 132, 134, 136, 139, 143, 148, 154, 161, 167, 172, 176, 179, 182, 185, 188, 192, 197
Offset: 1

Views

Author

Rémy Sigrist, Jan 29 2017

Keywords

Comments

This sequence is strictly increasing.
For any n>0, a(n+1)=index of last term of n-th run of consecutive terms in arithmetic progression in A281579.

Crossrefs

Cf. A281579.

Formula

a(n)=2-n+Sum_{k=1..n-1} A281579(k) for any n>0.

A362816 Lexicographically earliest sequence such that nowhere is a term a(n) contained in an arithmetic progression of length greater than a(n).

Original entry on oeis.org

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

Views

Author

Samuel Harkness, May 04 2023

Keywords

Comments

Progressions are terms at indices in arithmetic progression and with values which are some arithmetic progression too.
1 is never in the sequence, because if a(n) = 1, then {a(n),a(n+1)} would form an arithmetic progression greater than 1 in length.
Conjecture: only terms in A362815 appear in this sequence. This is true through the first 10^5 terms.
If this is true, then a(A003278) = 2, because the only way to constrain 2 would be {2,2,2}, and A003278 is defined by adding the smallest term which avoids any 3 term arithmetic progressions. If the conjecture is false, arithmetic progressions {4,3,2}, {8,5,2}, etc. may further constrain 2s.

Examples

			For n=9 first we check 1 (never in the sequence). If a(9) were 2, {a(1),a(5),a(9)} = {2,2,2} would form an arithmetic progression of length 3 with a minimum value of 2; this is not allowed. Next, if a(9) were 3, {a(6),a(7),a(8),a(9)} = {3,3,3,3} would form an arithmetic progression of length 4 with a minimum value of 3; this is not allowed. Next, if a(9) were 4, {a(5),a(7),a(9)} = {2,3,4} would form an arithmetic progression of length 3 with a minimum value of 2; this is not allowed. Last, a(9) = 5 fits the definition, as no arithmetic progressions p can be made such that length(p) > min (p) and 5 is the least positive integer where this is satisfied, so a(9) = 5.
		

Crossrefs

Cf. A362815, A363011 (indices of record highs), A003278, A090822, A281579.

Programs

  • MATLAB
    See Links section.

A113138 Self-describing sequence made of strings of consecutive integers. The number of elements in each string is the sequence itself.

Original entry on oeis.org

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

Views

Author

Eric Angelini, Jan 04 2006

Keywords

Comments

The less interesting sequence 1,1,1,1,1,1,1,1, ... obeys the same rule.

Examples

			First string is "1", having 1 element. Second string is "3,4,5" having 3 elements. Third string is "1,2,3,4" which has 4 elements. Next string is "1,2,3,4,5", made of 5 elements. Next string is "1", having only 1 element, etc. So we have 1 element, then 3, then 4, then 5, then 1, etc. This is the sequence itself.
		

Crossrefs

Cf. A281579.

Extensions

More terms from Rémy Sigrist, Feb 08 2017

A380317 The lexicographically earliest sequence of positive numbers which is identical to the run lengths of its first differences.

Original entry on oeis.org

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

Views

Author

Dominic McCarty, Feb 13 2025

Keywords

Comments

34 is the smallest value that does not appear in the first 10000 terms.
Conjecture: Every positive integer eventually appears.
Shortly after submitting this sequence the author, Dominic McCarty, discovered that it is almost identical to A281579: in fact, a(n) = A281579(n) - 1 for all n. However, since A281579 has seniority and the present sequence has a simpler definition and is more likely to be searched for, it has been decided to retain both entries. - N. J. A. Sloane, Feb 17 2025
The index of n in the present sequence is given by A281900(n+1).

Examples

			The sequence of first differences (where the n-th term is a(n+1)-a(n)) is:
0, 1, 0, 0, 1, 1, -1, -1, 0, 0, 0, 1, 1, 1, 1, -1, -1, -1, 0, 0, ...
The run lengths of consecutive values are:
1, 1, 2, 2, 2, 3, 4, 3, 2, ...
Which is the original sequence.
		

Crossrefs

Programs

  • Python
    from itertools import groupby
    def runs(l): return [len(list(group)) for i, group in groupby(l)]
    def firstDifs(l): return [l[i]-l[i-1] for i in range(1,len(l))]
    a = [1,1]
    while len(runs(firstDifs(a))) <= 100:
        a.append(1)
        b, m = runs(firstDifs(a)), max(firstDifs(a))
        while not (all(b[n] == a[n] for n in range(len(b)-1)) and b[-1] <= a[len(b)-1]):
            a[-1] += 1
            if a[-1] > m+a[-2]+1: a.pop(); a[-1] += 1 #Backtracking needed
            b = runs(firstDifs(a))
    print(a[:len(runs(firstDifs(a)))])

A381537 Lexicographically least sequence of natural numbers such that for all arithmetic progressions p, length(p) <= sqrt(max(p)).

Original entry on oeis.org

1, 4, 5, 8, 9, 10, 12, 15, 16, 17, 18, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92
Offset: 1

Views

Author

Samuel Harkness, Feb 26 2025

Keywords

Comments

Up to a(n) the longest possible arithmetic progression is sqrt(a(n)).
Does the density of this sequence approach 1?

Examples

			1 is in the sequence, as 1 creates the arithmetic progression p = {1}, where length(p) = 1 and sqrt(max(p)) = 1.
For 2: the arithmetic progression p = {1,2} would be created. Here, length(p) = 2, and sqrt(max(p)) = sqrt(2), so length(p) > sqrt(max(p)), thus 2 is not in the sequence. Similarly, 3 is not in the sequence.
For 4: p = {1,4} is the only new arithmetic progression. Here, length(p) = 2, and sqrt(max(p)) = 2, so 4 is in the sequence. Similarly, 5 is in the sequence.
For 6: the arithmetic progression p = {4,5,6} would be created. Here, length(p) = 3, and sqrt(max(p)) = sqrt(6), so length(p) > sqrt(max(p)), thus 6 is not in the sequence.
		

Crossrefs

Programs

  • MATLAB
    % See Links section.
Showing 1-7 of 7 results.