login
A038805
Difference between last prime < 10^n and 10^n is a record high.
1
1, 4, 9, 21, 24, 34, 56, 66, 92, 100, 112, 117, 135, 180, 260, 349, 387, 393, 411, 574, 617, 787, 1209
OFFSET
1,2
EXAMPLE
For a(19)=411, the difference is 4433 and no other n <= 540 exceeds that difference.
MATHEMATICA
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; d = 0; k = 1; Do[ While[f = 10^k - PrevPrim[10^k]; d >= f, k++ ]; d = f; Print[k], {n, 1, 50}]
CROSSREFS
Cf. A033874.
Sequence in context: A147971 A197869 A276319 * A192162 A251545 A228642
KEYWORD
base,nonn
AUTHOR
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 18 2002
a(23) from Robert G. Wilson v, Jan 10 2007
STATUS
approved