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.

A374739 a(1) = 1, a(2) = 4; for n > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) while a(n)/gcd(a(n),a(n-1)) does not equal any previous term.

Original entry on oeis.org

1, 4, 6, 9, 15, 10, 14, 16, 12, 8, 20, 22, 26, 34, 36, 21, 33, 39, 51, 54, 30, 18, 27, 45, 25, 35, 49, 77, 55, 65, 85, 95, 38, 46, 48, 28, 42, 57, 69, 72, 40, 24, 44, 52, 58, 62, 64, 56, 68, 74, 82, 86, 94, 100, 60, 50, 70, 91, 119, 133, 161, 115, 145, 87, 93, 96, 66, 78, 102, 106, 118, 122, 126
Offset: 1

Views

Author

Scott R. Shannon, Jul 18 2024

Keywords

Comments

The sequence shows long runs of both even and odd terms; in the first 100000 terms the longest run of even terms is 979 while the longest run of odd terms is 3668. In the same range the vast majority of terms with a(n) > n are odd; only 914 even terms are above this line while 60073 odd terms are, the majority of the later having only two prime factors - see the linked image.
Unless the sequence starts with primes no other primes can appear in the sequence, hence is natural to start the sequence with a(1) = 1 and a(2) = 4.
The fixed points begin 1, 25, 548, 1617, 2763, 3897, 5253, although it is likely there are many more.

Examples

			a(3) = 6 as 6 shares a factor with a(2) = 4 and 6/gcd(6,4) = 3, and 3 does not equal any previous term.
a(10) = 8 as 8 shares a factor with a(9) = 12 and 8/gcd(8,12) = 2, and 2 does not equal any previous term.
		

Crossrefs