OFFSET
1,2
LINKS
EXAMPLE
A297075(42) = 29, hence a(29) = 42.
MATHEMATICA
Take[#, LengthWhile[Differences@ #[[All, 1]], # == 1 &]][[All, -1]] &@ Sort@ MapIndexed[{#1, First@ #2} &, Nest[Append[#, Block[{k = 3, m = FactorInteger[#[[-1]] ][[All, -1]]}, While[Nand[FreeQ[#, k], ! IntersectingQ[m, FactorInteger[k][[All, -1]]]], k++]; k]] &, {1, 2}, 120]] (* Michael De Vlieger, Dec 29 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 29 2017
STATUS
approved