The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A339316 a(1) = 2; for n > 1, a(n) = smallest composite number not previously occurring which does not share a factor with a(n-1). 1
 2, 9, 4, 15, 8, 21, 10, 27, 14, 25, 6, 35, 12, 49, 16, 33, 20, 39, 22, 45, 26, 51, 28, 55, 18, 65, 24, 77, 30, 91, 32, 57, 34, 63, 38, 69, 40, 81, 44, 75, 46, 85, 36, 95, 42, 115, 48, 119, 50, 87, 52, 93, 56, 99, 58, 105, 62, 111, 64, 117, 68, 121, 54, 125, 66, 133, 60, 143, 70, 123, 74, 129 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The sequence excludes primes as otherwise the terms would simply be all the ordered integers >= 2. The terms appear to cluster around two lines; the lower line is a(n) ~ n while the upper lines starts with a gradient of approximately 2 and then slowly flattens. It is possible this gradient approaches 1 as n->infinity. LINKS Scott R. Shannon, Table of n, a(n) for n = 1..10000 EXAMPLE a(2) = 9, as a(1) = 2 thus a(2) cannot contain 2 as a factor and cannot be a prime. The lowest unused composite matching these criteria is 9. a(3) = 4, as a(2) = 9 and thus a(3) cannot contain 3 as a factor and cannot be a prime. The lowest unused composite matching these criteria is 4. a(4) = 15, as a(3) = 4 and thus a(4) cannot contain 2 as a factor and cannot be a prime. The lowest unused composite matching these criteria is 15. PROG (PARI) isok(k, fprec, v) = {if (!isprime(k) && #select(x->(x==k), v) == 0, #setintersect(Set(factor(k)[, 1]), fprec) == 0; ); } lista(nn) = {my(va= vector(nn)); va = 2; for (n=2, nn, my(k=2, fprec = Set(factor(va[n-1])[, 1])); while (! isok(k, fprec, va), k++); va[n] = k; ); va; } \\ Michel Marcus, Nov 30 2020 (Python) from sympy import isprime, primefactors as pf def aupton(terms):   alst, aset = , {2}   for n in range(2, terms+1):     m, prevpf = 4, set(pf(alst[-1]))     while m in aset or isprime(m) or set(pf(m)) & prevpf != set(): m += 1     alst.append(m); aset.add(m)   return alst print(aupton(72)) # Michael S. Branicky, Feb 09 2021 CROSSREFS Cf. A337687, A000961, A064413, A336957, A098550, A020639, A280864. Sequence in context: A342663 A332575 A080803 * A228967 A342661 A213821 Adjacent sequences:  A339313 A339314 A339315 * A339317 A339318 A339319 KEYWORD nonn AUTHOR Scott R. Shannon, Nov 30 2020 STATUS approved

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

Last modified January 23 14:33 EST 2022. Contains 350512 sequences. (Running on oeis4.)