login
A350314
The catch-up points of the Redstone permutation A350313.
2
2, 5, 11, 17, 23, 29, 37, 41, 47, 53, 59, 67, 71, 77, 83, 89, 97, 101, 107, 113, 119, 127, 131, 137, 143, 149, 157, 161, 167, 173, 179, 187, 191, 197, 203, 209, 221, 227, 233, 239, 247, 251, 257, 263, 269, 277, 281, 287, 293, 299, 307, 311, 317, 323, 329, 337
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
Sequence in context: A067775 A140552 A138644 * A164921 A156830 A140556
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 24 2021
STATUS
approved