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.

A382091 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number such that a(n) shares a factor with a(n-1) while the total number of prime terms of the form 4*k + 1 is never less than those of the form 4*k + 3.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 5, 15, 3, 9, 12, 14, 16, 18, 20, 22, 24, 21, 27, 30, 25, 35, 28, 26, 13, 39, 33, 11, 44, 32, 34, 17, 51, 36, 38, 19, 57, 42, 40, 45, 48, 46, 50, 52, 54, 56, 49, 63, 60, 55, 65, 70, 58, 29, 87, 66, 62, 31, 93, 69, 72, 64, 68, 74, 37, 111
Offset: 1

Views

Author

Scott R. Shannon, Mar 15 2025

Keywords

Comments

Unlike the EKG sequence A064413 the primes do not occur in their natural order, and the terms proceeding and following a prime can be more than two and three times respectively the value of the prime term. In the first 100000 terms the largest ratio found is a(75) = 84, a(76) = 7, with 84/7 = 12.
Like the EKG sequence the terms are predominantly concentrated along three lines, but with the addition of at least four more sparsely populated lines; see the attached image.
In the first 100000 terms the fixed points are 1, 2, 77, 121; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.
Note that if the prime form selection rule is reversed so that the total number of primes of the form 4*k + 1 is never more than those of the form 4*k + 3 then the sequence will match the EKG sequence for the first 52082 terms, beyond which a(52083) = 53724 while for the EKG sequence a(52083) = 26861, this later value being the first prime where the prime-race leader changes; see A007350.

Examples

			a(5) = 8 as a(4) = 6 and 8 is unused and shares a factor with 6. Note that 3 cannot be chosen as 3 is of the form 4*k + 3, and no primes of form 4*k + 1 have yet occurred. This is the first term to differ from A064413.
a(7) = 5 as a(6) = 10 and 5 is unused and shares a factor with 10. This is the first prime of the form 4*k + 1 to occur.
a(9) = 3 as a(8) = 15 and 3 is unused and shares a factor with 15. As a prime of the form 4*k + 1 has occurred, one of the form 4*k + 3 is now allowed.
		

Crossrefs