OFFSET
1,1
COMMENTS
We say n is a 'catch-up point' of a permutation p of the positive integers if and only if p restricted to [n] = {1, 2, ..., n} is a permutation of [n].
The periodic structure of the first differences is described in A350315.
MATHEMATICA
s = {2, 1}; c[_] = 0; Array[Set[c[s[[#]]], #] &, Length[s]]; j = Last[s]; u = 3; {2}~Join~Reap[Monitor[Do[If[j == u, While[c[u] > 0, u++]]; k = u; While[Nand[c[k] == 0, CoprimeQ[i, k], ! Divisible[i - 1, k]], k++]; If[k == u, Sow[i]]; Set[c[k], i]; j = k, {i, Length[s] + 1, 337}], i]][[-1, -1]] (* Michael De Vlieger, Dec 24 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 24 2021
STATUS
approved