OFFSET
1,1
COMMENTS
The terms greater than 10^18 are obtained assuming that nextprime(n) < n + (log n)^2, which is known to hold at least for 4 < n < 10^18.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..42 (terms < 10^36)
Carlos Rivera, Puzzle 786
EXAMPLE
The number 9 is in the sequence because the surrounding primes are 7 and 11 and 711 is divisible by 9.
MATHEMATICA
Select[Range[3, 10^4], Divisible[ FromDigits[ Join@@ IntegerDigits@ NextPrime[#, {-1, 1}]], #]&]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Giovanni Resta, May 23 2015
STATUS
approved