%I #63 Jan 14 2024 12:31:09
%S 2,6,10,12,14,18,15,20,22,24,21,28,26,30,33,36,34,38,40,35,42,39,45,
%T 48,44,46,50,52,54,51,57,60,55,65,70,58,56,62,66,63,69,72,68,74,76,78,
%U 75,80,82,84,77,88,86,90,85,95,100,92,94,96,87,93,99,102,98,91,104,106,108,105,110,112
%N a(1) = 2; for n > 1, a(n) = smallest number not occurring earlier which shares a prime factor with a(n-1) and also has a prime factor which is not a factor of a(n-1).
%C Like A336957 no prime or prime power can be a term as if it shared a prime factor with the previous term it would then not contain a prime factor not in the previous term. It is likely all other composite numbers appear.
%H Scott R. Shannon, <a href="/A337687/b337687.txt">Table of n, a(n) for n = 1..1000</a>
%e a(2) = 6 as 2*3 = 6, where 2 is a prime factor shared with a(1) = 2 and 3 is a prime factor which is not a factor of a(1).
%e a(3) = 10 as 2*5 = 10, where 2 is a prime factor shared with a(2) = 6 and 5 is a prime factor which is not a factor of a(2).
%e a(4) = 12 as 2*2*3 = 12, where 2 is a prime factor shared with a(3) = 10 and 3 is a prime factor which is not a factor of a(3).
%o (PARI)
%o isok(k, fprec, v) = {if (#select(x->(x==k), v) == 0, my(f = Set(factor(k)[,1]), finter = setintersect(f, fprec)); #setintersect(f, fprec) && #setminus(f, fprec););}
%o 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
%Y Cf. A000961, A064413, A336957, A098550, A020639, A280864.
%K nonn
%O 1,1
%A _Scott R. Shannon_, Nov 28 2020