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.

A378116 Lexicographically earliest sequence of distinct positive integers such that a(a(n)) shares a factor with a(a(n)-2) while not sharing a factor with a(a(n)-1).

Original entry on oeis.org

3, 4, 9, 8, 7, 6, 35, 12, 25, 11, 15, 22, 14, 33, 16, 21, 18, 49, 20, 63, 26, 27, 19, 24, 95, 28, 45, 32, 31, 30, 217, 34, 77, 36, 55, 38, 39, 40, 51, 44, 42, 121, 46, 99, 50, 57, 43, 48, 215, 52, 75, 56, 54, 91, 58, 65, 62, 85, 60, 119, 64, 105, 68, 69, 70, 61, 71, 122, 213, 74, 81, 73, 78, 365, 76, 115, 82, 125, 83, 80, 249, 86, 87, 88, 93, 92, 111, 94, 84
Offset: 1

Views

Author

Scott R. Shannon, Nov 17 2024

Keywords

Comments

A self-referencing Yellowstone permutation-like sequence. Care must be taken when finding a(n) to ensure that, if n+1 has previously appeared in the sequence, a(n-1) has at least one prime factor not in a(n), else a(n+1) would not exist.
In the first 100000 terms the fixed points are 6, 24, 30, 48, 80, 240, 629, 2328, 2532, 3960, 17130, 29850, 57480, 57876, 60180. It is likely more exist.
The missing numbers are 1, 2, 5, 10, 13, 17, 23, 29, 37, 41, 47, 53, 59, 66 ... .

Examples

			a(1) = 3 as a(3) = 9 and 9 is the smallest unused number that shares a factor with a(3-2) = a(1) = 3 while not sharing a factor with a(3-1) = a(2) = 4.
a(5) = 7 as a(7) = 35 and 35 is the smallest unused number that shares a factor with a(7-2) = a(5) = 7 while not sharing a factor with a(7-1) = a(6) = 6. Note that a(5) cannot be 5 as 5 does not share a factor with a(5-2) = a(3) = 9, nor can it be 6 as that would imply a(6) shares a factor with a(6-2) = a(4) = 8 while not sharing a factor with a(6-1) = a(5) = 6, which is impossible.
		

Crossrefs