OFFSET
2,1
LINKS
Robert Israel, Table of n, a(n) for n = 2..1000
MAPLE
f:= proc(n) local r; r:= (10^n-1)/9; r - prevprime(r) end proc:
map(f, [$2..100]); # Robert Israel, Feb 23 2017
MATHEMATICA
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; Table[(10^n - 1)/9 - PrevPrim[(10^n - 1)/9], {n, 2, 70}]
Table[With[{ru=(10^n-1)/9}, ru-NextPrime[ru, -1]], {n, 2, 70}] (* Harvey P. Dale, Aug 14 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jul 12 2004
STATUS
approved