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.

A351625 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with the largest previous term.

Original entry on oeis.org

1, 2, 4, 6, 3, 8, 10, 5, 12, 9, 14, 7, 16, 18, 15, 20, 22, 11, 24, 21, 26, 13, 28, 30, 25, 27, 32, 34, 17, 36, 33, 38, 19, 40, 35, 42, 39, 44, 46, 23, 48, 45, 50, 52, 54, 51, 56, 49, 58, 29, 60, 55, 57, 62, 31, 64, 66, 63, 68, 70, 65, 72, 69, 74, 37, 76, 78, 75, 80, 82, 41, 84, 77, 81, 86, 43, 88
Offset: 1

Views

Author

Scott R. Shannon, May 04 2022

Keywords

Comments

The sequence differs from A352976 after twenty-six terms. See the examples below.
In the first 100000 terms the maximum run of even and odd terms is three and five respectively; it is unknown if these runs have a maximum number of terms or are unbounded. The fixed points beyond 2 are 15, 25, 35, and it is likely no more exist. The primes appear in their natural order, and it is conjectured that this is a permutation of the positive integers.
From Michael De Vlieger, May 08 2022: (Start)
Let u be the smallest missing number in a(1..n-1) and let record r = max(a(1..n-1)).
Theorem: For odd prime q, r = mq -> q. Proof: generally, q may either divide or be coprime to r, but since equality and coprimality are prohibited by definition, primes may only divide records. This implies q serves as local minima, hence u > 2 is always an odd prime and r > 1 is always even.
Since r is always even, r is nondecreasing and even numbers appear in natural order. Also, r = 2q -> q, similar to the Lagarias-Rains-Sloane chain in the EKG sequence but without the successor 3q.
Theorem: a(n) = k such that k is odd iff least prime factor q | k and q | r. Proof: sequence definition demands smallest missing number such that (r,k) > 1. Otherwise, a(n) = a(n-1) + 2, since (a(n-1), a(n-1) + 2) > 1, and all smaller even numbers have already appeared.
All even numbers and primes appear, and every odd composite k has a least prime factor that admits k into the sequence on the occasion of (r,k) > 1.
There are 3 trajectories in scatterplot for a(n) > 1. The trajectory with lowest apparent slope is that of the primes, i.e., local minima. The trajectory with highest slope is that of records, i.e., even numbers, and the remaining numbers are odd composites. (End)

Examples

			a(6) = 8 as the largest value of all previous terms is a(4) = 6, and 8 is the smallest unused number that shares a factor with 6.
a(27) = 32 as the largest value of all previous terms is a(24) = 30, and 32 is the smallest unused number that shares a factor with 30. Note that A352976(27) = 33 as it must share a factor with max(25,27) = 27.
		

Crossrefs

Programs

A351626 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with both the largest and second largest value of all previous terms.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 15, 22, 24, 26, 28, 30, 21, 32, 34, 36, 38, 40, 42, 35, 44, 33, 46, 48, 50, 45, 52, 54, 39, 56, 58, 60, 62, 64, 66, 68, 51, 70, 72, 63, 74, 76, 78, 57, 80, 65, 75, 82, 84, 86, 88, 90, 55, 92, 69, 94, 96, 98, 100, 102, 85, 104, 106, 108, 110, 99, 105, 112, 77
Offset: 1

Views

Author

Scott R. Shannon, May 04 2022

Keywords

Comments

The sequence contains no primes or prime powers other than the powers of 2. As the sequence starts with 2 and 4, these terms being the largest and second largest values, the following terms will be even. This pattern continues until a term equal to the product of two or more odd primes occurs that shares a factor with the previous two largest even values and is smaller than the largest value plus 2. It is not possible for this value to be a prime larger than 2, or a power of such a prime, as the two terms with which it must share a factor differ by 2. It therefore cannot be between them either so it must be less than the second largest even term. Thus the next term after this odd composite must still share a factor with the two largest even values, and this will be the largest value plus 2 or another smaller odd composite. Therefore two more even values eventually become the two largest terms again, and thus the pattern of the two largest even terms, differing by two, interrupted by odd composites continues. Therefore no primes or prime powers other than powers of 2 will occur.
In the first 200000 terms the maximum run of even and odd terms is twelve and seven respectively; it is unknown if these runs have a maximum number of terms or are unbounded. The fixed points beyond 2 in the same range are 573, 597, 633, 6487, 21865, 22115, although it is likely more exist.

Examples

			a(5) = 8 as the largest and second-largest values of all previous terms are a(4) = 6 and a(3) = 4, and 8 is the smallest unused number that shares a factor with both of these values.
a(12) = 15 as the largest and second-largest values of all previous terms are a(11) = 20 and a(10) = 18, and 15 is the smallest unused number that shares a factor with both of these values.
		

Crossrefs

A351496 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n>2, a(n) has a common factor with the largest previous term but not with the second largest previous term.

Original entry on oeis.org

1, 2, 6, 3, 4, 15, 5, 35, 7, 14, 28, 25, 45, 9, 12, 18, 24, 27, 33, 36, 55, 11, 22, 44, 77, 21, 42, 49, 56, 99, 30, 39, 48, 51, 54, 57, 60, 69, 72, 75, 78, 187, 17, 34, 68, 85, 119, 66, 88, 110, 121, 102, 136, 143, 153, 154, 221, 13, 26, 52, 65, 91, 104, 117, 130, 156, 169, 182, 195, 238, 8, 10
Offset: 1

Views

Author

Scott R. Shannon, May 03 2022

Keywords

Comments

Similar to the Enots Wolley sequence A336957 the next term, when required, is chosen so that the sequence is infinite. All terms must satisfy the condition of sharing a factor with the largest previous term and not with the second largest previous term. When such a term is smaller than the second largest previous term then no other restriction need be applied since it will not influence subsequent terms in the sequence. This means such terms can be prime or a prime power - this is in contrast to A336957 where such numbers cannot occur.
When the next term is larger than the current second largest term but smaller than the largest term then it must be chosen so that the largest term has a prime factor not in common with it. When the next term is larger than the current largest term then it must be chosen so that it has a prime factor not in common with the current largest term. These later conditions ensure that the following term always exists. See the examples below. Although these rules are enforced surprisingly, in the first 200000 terms, they are very rarely required. Only three times in this range is a number, which is larger than the current largest value, rejected as it would not have a unique prime factor with the current largest term. And in the same range a number, between the current largest and second largest term, is never rejected as it would have all the same prime factors as the current largest term. If this holds true as n grows arbitrarily large is unknown.
The primes do not occur in their natural order, and the terms before and after prime values can be a large multiple of the prime, e.g. a(2147) = 3097, a(2148) = 19, a(2149) = 361. The sequence is conjectured to be a permutation of the positive integers although it may take many terms for some primes to appear, e.g., 29 has not occurred after 200000 terms. In the same range the fixed points beyond 2 are 92 and 40100, although it is possible more exist.

Examples

			a(4) = 3 as the largest and second largest previous terms are a(3) = 6 and a(2) = 2 respectively, and 3 is the smallest unused number that shares a factor with 6, not with 2, and does not contain the same prime factors as 6.
a(6) = 15 as the largest and second largest previous terms are a(3) = 6 and a(5) = 4 respectively, and 15 is the smallest unused number that shares a factor with 6, not with 4, and has a prime factor not in common with 6. Note that 9 satisfies the first two conditions but not the third.
a(7) = 5 as the largest and second largest previous terms are a(6) = 15 and a(3) = 6 respectively, and 5 is the smallest unused number that shares a factor with 15 but not with 6.
		

Crossrefs

A351497 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n>2, a(n) has a common factor with the second largest previous term but not with the largest previous term.

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 10, 21, 5, 16, 20, 22, 7, 15, 27, 11, 14, 26, 13, 28, 33, 32, 34, 39, 17, 38, 19, 40, 51, 25, 35, 44, 46, 23, 50, 52, 45, 57, 56, 49, 58, 63, 29, 62, 31, 64, 69, 68, 70, 81, 55, 65, 74, 37, 76, 80, 82, 75, 87, 41, 86, 43, 88, 93, 77, 92, 94, 99, 47, 98, 91, 100, 111, 85, 95, 104
Offset: 1

Views

Author

Scott R. Shannon, May 03 2022

Keywords

Comments

Similar to the Yellowstone permutation A098550 the next term can be chosen just by satisfying the conditions of sharing a factor with the second largest previous term and not with the largest previous term. When such a term is smaller than the second largest previous term then it can take any value not previously seen as it will not influence subsequent terms in the sequence. This means such terms can be prime or prime powers. If instead the term is larger than the second largest previous term then, as a result of the required factor sharing conditions, it will always have prime factors not in common with the current largest term. This means a following term can always be found and no other conditions on the prime factors of the term are required. This is in contrast to A351496 where additional restriction on the prime factors of the next term need to be enforced to ensure the sequence is infinite.
The primes occur in their natural order, and in general are not divisors of the previous or following term. The sequence is conjectured to be a permutation of the positive integers although it takes many terms for some values to appear, e.g., a(176478) = 42. In the first 200000 terms the fixed points beyond 4 are 7968 and 18552, although it is possible more exist.

Examples

			a(6) = 8 as the largest and second largest previous terms are a(5) = 9 and a(4) = 4 respectively, and 8 is the smallest unused number that shares a factor with 4 and not with 9.
a(9) = 5 as the largest and second largest previous terms are a(8) = 21 and a(7) = 10 respectively, and 5 is the smallest unused number that shares a factor with 10 and not with 21.
		

Crossrefs

Showing 1-4 of 4 results.