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[1] = 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], {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
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Nov 30 2020
STATUS
approved