OFFSET
1,1
COMMENTS
Neighbors of 9 are 0 and 8 and 9.
LINKS
T. D. Noe, Table of n, a(n) for n=1..1000
MATHEMATICA
Do[a = IntegerDigits[ Prime[n]]; k = 1; l = Length[a]; While[k < l && (Abs[a[[k]]- a[[k + 1]]] < 2 || Abs[a[[k]] - a[[k + 1]]] > 8), k++ ]; If[k == l, Print[ Prime[n]]], {n, 1, 10^4} ]
Select[Prime[Range[1500]], Max[Abs[Differences[IntegerDigits[#]]]/.{9->1}] < 2&] (* Harvey P. Dale, Jan 31 2012 *)
PROG
(Haskell)
a068148 n = a068148_list !! (n-1)
a068148_list = filter ((== 1) . a010051') a032981_list
-- Reinhard Zumkeller, Feb 14 2015
CROSSREFS
KEYWORD
base,easy,nonn,nice
AUTHOR
Amarnath Murthy, Feb 23 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v and Sascha Kurz, Mar 01 2002
Corrected by T. D. Noe, Feb 15 2008
STATUS
approved