OFFSET
1,2
COMMENTS
a(n) = A042948(n) for n<=1065, but then the two sequences start to differ. - R. J. Mathar, Nov 06 2020
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..20000
MATHEMATICA
M = 1000;
A[1] = 1; A[2] = 2;
Clear[B]; B[_] = 0;
For[n = 3, True, n++, For[k = 3, k <= M, k++, If[B[k] == 0 && GCD[k, A[n-1]] > 1 && GCD[k, A[n-2]] == 1, If[Length[FactorInteger[k][[All, 1]] ~Complement~ FactorInteger[A[n-1]][[All, 1]]] > 0, A[n] = k; B[k] = 1; Break[]]]]; If[k > M, Break[]]];
Reap[For[k = 1, k <= M, k++, If[OddQ[A[k]], Sow[k]]]][[2, 1]] (* Jean-François Alcover, Oct 23 2020, after Maple code in A336957 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 18 2020
STATUS
approved