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

%I #12 Jun 24 2024 10:58:25

%S 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,

%T 32,65,19,33,14,85,247,69,22,35,221,23,6,95,119,143,12,115,133,187,18,

%U 125,161,209,24,145,217,253,26,15,29,31,28,39,185,289,38,63,37,155,34,81,203,205,44

%N 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).

%C 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.

%C 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.

%H Scott R. Shannon, <a href="/A373999/b373999.txt">Table of n, a(n) for n = 1..10000</a>

%H Scott R. Shannon, <a href="/A373999/a373999_1.png">Image of the first 100000 terms</a>. 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.

%e 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.

%o (Python)

%o from math import gcd, lcm

%o from itertools import count, islice

%o def agen(): # generator of terms

%o alst = [1, 2, 3, 5, 7]

%o yield from alst

%o aset, LCM, mink = set(alst), lcm(*alst[:-3]), 4

%o while True:

%o 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)

%o LCM = lcm(LCM, alst[-3])

%o alst.append(an)

%o aset.add(an)

%o while mink in aset: mink += 1

%o yield an

%o print(list(islice(agen(), 70))) # _Michael S. Branicky_, Jun 24 2024

%Y Cf. A373998, A373390, A089088, A064413, A098550, A373880.

%K nonn,new

%O 1,2

%A _Scott R. Shannon_, Jun 24 2024

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 30 08:10 EDT 2024. Contains 373861 sequences. (Running on oeis4.)