OFFSET
0,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..1000
EXAMPLE
77th term = 13: 13 + 76 (=77-1) = 89: '13' and '89' = 1389 equals a lucky number.
MATHEMATICA
Block[{L = Array[2 # + 1 &, 10^5 + 1, 0], m, n, r, s}, For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; m = Max[L]; Array[Block[{k = 1}, While[And[# < m, FreeQ[L, #]] &@ Set[s, FromDigits@ Join[IntegerDigits[k], IntegerDigits[k + #]]], k++]; If[s <= m, k, -1]] &, 95, 0]] (* Michael De Vlieger, Jun 24 2020, after Jean-François Alcover at A000959 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
STATUS
approved