OFFSET
1,1
COMMENTS
EXAMPLE
a(4) = 4 as a(3) = 4 = 2*2 and a(2) = 2, thus a(4) must contain 2 as a prime factor but must also contain a prime factor other than 2. The lowest unused number matching these criteria is 2*3 = 6.
a(7) = 9 as a(6) = 10 = 2*5 and a(5) = 6 = 2*3, thus a(7) must contain 2 or 3 as a prime factor but must also contain a prime factor other than 2 and 5. The lowest unused number matching these criteria is 3*3 = 9.
MATHEMATICA
Block[{a = {1, 2, 3}, b = {2}, c = {3}, p, k}, Do[k = 2; While[Nand[FreeQ[a, k], IntersectingQ[b, Set[p, FactorInteger[k][[All, 1]]]], Length@ Complement[p, Intersection[c, p]] > 0], k++]; AppendTo[a, k]; b = c; c = p, 73]; a] (* Michael De Vlieger, Dec 12 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Dec 12 2020
STATUS
approved