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.

Previous Showing 21-24 of 24 results.

A340807 a(n) = n if n <= 3; for n > 3, a(n) is the closest number to a(n-2) that has not occurred earlier and has at least one common factor with a(n-2), but none with a(n-1). In case of a tie, choose the smaller.

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 15, 14, 5, 12, 25, 16, 35, 18, 49, 20, 63, 22, 57, 26, 51, 28, 45, 32, 39, 34, 33, 38, 27, 40, 21, 44, 7, 46, 77, 48, 91, 50, 117, 55, 114, 65, 112, 75, 116, 69, 118, 81, 122, 87, 124, 99, 128, 93, 130, 111, 134, 105, 136, 95, 138, 85, 141, 80, 147, 82, 153, 86, 159, 88
Offset: 1

Views

Author

Scott R. Shannon, Jan 22 2021

Keywords

Comments

The sequence uses a similar selection rule to the Yellowstone permutation A098550 but instead of choosing the smallest number that has not occurred earlier that has a common factor with a(n-2) and no common factor with a(n-1), the number closest to a(n-2) that satisfies these rules is selected for a(n). If two such numbers are the same distance from a(n-2) then the smaller is chosen.
Many terms are clustered along a line with gradient approximately 1.33. However, along this line the terms often rapidly drop to much smaller values before returning to the main line. More interesting is the existence of regions on the same line where the terms split and form two lines of constantly increasing values. These lines continue until they both start decreasing again to rejoin near the original line.
In the first 15 million terms the maximum number of consecutive increasing terms is seven. This run starts at n = 47685. The maximum number of consecutive decreasing terms is also seven. This starts at n = 4134621.
In the first 15 million terms the fixed points, other than the first three terms, are 4, 323, 516718, 2199679, 2401224. As the terms for larger n seem to drop below the a(n)=n line on numerous occasions, it is possible that more exist, although this is unknown. The smallest number not appearing is 6, although other small values appear after many terms, e.g. a(4946191) = 23. It is unknown if all values eventually appear. The largest change in consecutive terms is from a(399922)=527754 to a(399923)=2887, a difference of 524867.
See also A340783 where the next term is the closest to a(n-1).

Examples

			a(5) = 9 as a(5-2) = a(3) = 3 so a(5) must have 3 as a factor, but cannot be 6 = 3*2 as it cannot have a common factor with a(5-1) = a(4) = 2.
a(12) = 16 as a(12-2) = a(10) = 12 so a(12) must have 2 or 3 as a factor, but cannot have a common factor with a(12-1) = a(11) = 25 = 5*5. The closest numbers to a(12-2) = a(10) = 12 which have 2 or 3 as a factor but not 5 are 8,9,14,16. The first three have already appeared so a(12) = 16.
		

Crossrefs

Programs

  • PARI
    See Links section.

A291588 Lexicographically earliest sequence of distinct positive terms such that for any n > 0 and k >= 0, gcd(a(n), a(n + 2^k)) = 1.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 11, 6, 13, 17, 8, 19, 9, 10, 23, 29, 14, 27, 25, 16, 31, 37, 12, 35, 41, 22, 43, 39, 20, 47, 49, 32, 33, 53, 26, 59, 61, 15, 67, 71, 28, 73, 45, 34, 79, 77, 38, 65, 83, 46, 89, 21, 40, 97, 91, 44, 51, 95, 58, 101, 103, 18, 55, 107, 52, 109
Offset: 1

Views

Author

Rémy Sigrist, Aug 27 2017

Keywords

Comments

For a nonempty subset of the natural numbers, say S, let f_S be the lexicographically earliest sequence of distinct positive terms such that, for any n > 0 and s in S, gcd(a(n), a(n + s)) = 1:
- f_S is well defined (we can always extend the sequence with a new prime number),
- f_S(1) = 1, f_S(2) = 2, f_S(3) = 3,
- all prime numbers appear in f_S, in increasing order,
- if a(k) = p for some prime p, then k <= p and max_{i=1..k} a(i) = p,
- in particular:
S f_S
--------- ---
{ 1 } A000027 (the natural numbers)
{ 2 } A121216
{ 1, 2 } A084937
{ 1, 2, 3 } A103683
{ 1, 2, 3, 4 } A143345
A000027 A008578 (1 alongside the prime numbers)
A000079 a (this sequence)
- see also Links section for the scatterplots of f_S for certain classical S sets,
- likely f_S = f_S' iff S = S'.
The motivation for this sequence is to have a sequence f_S for some infinite subset S of the natural numbers.

Examples

			a(1) = 1 is suitable.
a(2) must be coprime to a(2 - 2^0) = 1.
a(2) = 2 is suitable.
a(3) must be coprime to a(3 - 2^0) = 2, a(3 - 2^1) = 1.
a(3) = 3 is suitable.
a(4) must be coprime to a(4 - 2^0) = 3, a(4 - 2^1) = 2.
a(4) = 5 is suitable.
a(5) must be coprime to a(5 - 2^0) = 5, a(5 - 2^1) = 3, a(5 - 2^2) = 1.
a(5) = 4 is suitable.
a(6) must be coprime to a(6 - 2^0) = 4, a(6 - 2^1) = 5, a(6 - 2^2) = 2.
a(6) = 7 is suitable.
a(7) must be coprime to a(7 - 2^0) = 7, a(7 - 2^1) = 4, a(7 - 2^2) = 3.
a(7) = 11 is suitable.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A344307 a(n) is the smallest number not yet in the sequence that satisfies the following condition: if p is a prime factor of a(n), the next p terms are coprime to p.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 8, 11, 13, 6, 17, 19, 10, 21, 23, 16, 29, 27, 20, 31, 37, 12, 41, 43, 14, 15, 47, 22, 53, 39, 32, 25, 49, 18, 59, 61, 34, 45, 67, 38, 71, 33, 28, 65, 73, 24, 79, 83, 46, 75, 89, 56, 97, 81, 44, 85, 101, 26, 87, 103, 62, 35, 57, 64, 107
Offset: 1

Views

Author

Sergio Pimentel, May 14 2021

Keywords

Comments

It is not clear if every positive integer is in the sequence.

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, May 29 2021

A340779 a(1)=1, a(2)=2; for n>=3, a(n) = the closest number to a(n-1) that has not occurred earlier and has at least one common factor with a(n-1), but none with a(n-2). In case of a tie, choose the smaller.

Original entry on oeis.org

1, 2, 6, 15, 35, 28, 26, 39, 33, 22, 20, 45, 51, 34, 38, 57, 63, 56, 58, 87, 93, 62, 68, 85, 75, 72, 74, 185, 175, 168, 166, 415, 405, 402, 404, 505, 495, 492, 494, 481, 407, 396, 394, 985, 975, 972, 974, 2435, 2425, 2328, 2326, 5815, 5805, 5802, 5804, 7255, 7245, 7242, 7244, 9055
Offset: 1

Views

Author

Scott R. Shannon, Jan 21 2021

Keywords

Comments

The sequence uses a similar selection rule to the Enots Wolley sequence A336957 but instead of choosing the smallest number that has not occurred earlier that has a common factor with a(n-1) and no common factor with a(n-2), the number closest to a(n-1) that satisfies these rules is selected for a(n). If two such numbers are the same distance from a(n-1) then the smaller is chosen. Like A336957 for the sequence to continue a(n) must always have a prime factor not in a(n-1), thus a(n) cannot be a prime or a prime power.
The sequence grows sporadically with n, showing regions of little growth followed by a large jump due to the next term being the multiple of a large prime of the previous term. However due to the overall rapid increase in the terms it is very unlikely any fixed points exist.

Examples

			a(5) = 35 as a(4) = 15 = 3*5 and a(3) = 6 = 2*3, thus a(5) must be a multiple of 5 while not being a multiple of 3, and must have a prime factor other than 5. The smallest unused number closest to 15 satisfying these criteria is 35.
a(6) = 28 as a(5) = 35 = 5*7 and a(4) = 15 = 3*5, this a(6) must be a multiple of 7 while not being a multiple of 5, and must have a prime factor other than 7. The smallest number satisfying these criteria is 14. However 28 also does and is only 7 away from a(5), while 14 is 21 away, thus 28 is chosen. This is the first term that differs from A336957.
		

Crossrefs

Previous Showing 21-24 of 24 results.