Output nearby primes
Mathematica, 19
#~NextPrime~{-1,1}&
Mathematica: 28 chars
(k=NextPrime;{k[#,-1],k@#})&
Usage
%[1259]
{1249, 1277}
%[121231313159]
{121231313129, 121231313191}
Perl 5.10 (perl -E), 65 chars
Half the credit (at least) should go to @J B.
$m=<>;for(-1,1){$n=$m;0while(1x($n+=$_))=~/^1$|(^11+)\1+$/;say$n}