editing
approved
editing
approved
ncp[{n_, a_}]:=Module[{k=1}, {n+1, If[PrimeQ[n+1], IntegerReverse[NextPrime[ a]], While[!CompositeQ[k+a], k++]; IntegerReverse[k+a]]}]; NestList[ncp, {1, 1}, 80][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 05 2020 *)
approved
editing
editing
approved
editing
approved
editing
approved
editing
approved
The first two-digit a(n) occurs at n = 17. The first three-digit a(n) occurs at n = 643. According to Michel Marcus, in the first 10^8 terms, a(n) never exceeds 909. It is unknown whether it can or will exceed 909. See comment by _Rémy Sigrist_ belownow known that this is the maximal value (see the Weimholt link).
The Terms a(n) > 800 occur at indices (649, 3132, [3595], 3596, [6805], 6806, 7344, 8233, [8234], [11173], 11174, 12619, 13687, 14089, ...). (Subsequent indices are > 20000. Indices in [.] correspond to a non-maximal value, i.e., a(n+-1) > a(n).) The corresponding values are in the set {804, 806, 807, 808, 809, 904, 907} and occur as part of one of the following subsequences: (maxima starred)
approved
editing