login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A373999 a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 5, a(5) = 7; for n > 5, a(n) is the smallest unused positive number that is coprime to a(n-1), a(n-2) and a(n-3) but has a common factor with at least one of a(1)...a(n-4). 0
1, 2, 3, 5, 7, 4, 9, 25, 49, 8, 27, 55, 91, 16, 51, 11, 13, 10, 17, 21, 121, 20, 169, 57, 77, 32, 65, 19, 33, 14, 85, 247, 69, 22, 35, 221, 23, 6, 95, 119, 143, 12, 115, 133, 187, 18, 125, 161, 209, 24, 145, 217, 253, 26, 15, 29, 31, 28, 39, 185, 289, 38, 63, 37, 155, 34, 81, 203, 205, 44 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Initially the terms agree with the observation noted in A373998 and are concentrated predominantly along five lines of different gradient, with the primes forming the lowermost line. However this pattern is disrupted by the second lowest line showing a repetitive discontinuous jump to lower values which also interrupts the third middle line. An examination of the terms shows this is due to the appearance of three consecutive terms which are not divisible by 2 or 3. This allows subsequent terms to be a low multiple of 2 and 3, forming numbers which are less than the most recently appearing prime values. Also of note is after approximately 85000 terms the upper two lines merge; it is assumed that the remaining four lines continue in the above pattern as n grows arbitrarily large, although this is unknown.
Other than the first three terms the fixed points in the first 100000 terms are 35, 63, 219, 231, 1407, 2967, 3003, 6555, 14007, 14031, 32103, 77343, although it is likely more exist. For the terms studied the primes appear in their natural order. The sequence is conjectured to be a permutation of the positive integers.
LINKS
Scott R. Shannon, Image of the first 100000 terms. Numbers with one, two, three, four, or five and more prime factors, counted with multiplicity, are show as red, yellow, green, blue and violet respectively.
EXAMPLE
a(9) = 49 as 49 is the smallest unused number that is coprime to a(6) = 4, a(7) = 9, and a(8) = 25, while sharing a factor with a(5) = 7.
PROG
(Python)
from math import gcd, lcm
from itertools import count, islice
def agen(): # generator of terms
alst = [1, 2, 3, 5, 7]
yield from alst
aset, LCM, mink = set(alst), lcm(*alst[:-3]), 4
while True:
an = next(k for k in count(mink) if k not in aset and all(1 == gcd(k, m) for m in alst[-3:]) and gcd(k, LCM) > 1)
LCM = lcm(LCM, alst[-3])
alst.append(an)
aset.add(an)
while mink in aset: mink += 1
yield an
print(list(islice(agen(), 70))) # Michael S. Branicky, Jun 24 2024
CROSSREFS
Sequence in context: A356903 A284145 A284189 * A114319 A125151 A372130
KEYWORD
nonn,new
AUTHOR
Scott R. Shannon, Jun 24 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 29 07:27 EDT 2024. Contains 373826 sequences. (Running on oeis4.)