OFFSET
1,1
EXAMPLE
211 is a prime and its first and last digits differ by |2 - 1| = 1, so 211 is a term.
103 is a prime but its first and last digits differ by |1 - 3| = 2, so 103 is not a term.
PROG
(PARI) is(n)=abs(digits(n)[1]-n%10)==1 && isprime(n) \\ Charles R Greathouse IV, Dec 29 2012
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Juri-Stepan Gerasimov, Jan 27 2009
EXTENSIONS
827, 857, 877 etc. inserted by R. J. Mathar, Feb 13 2009
STATUS
approved