OFFSET
1,1
COMMENTS
First maximum the number of 9's, then choose the largest.
From Robert Israel, Dec 18 2024: (Start)
This is believed to be different from A241206, as there should be infinitely many n for which there is no n-digit prime with n-1 digits equal to 9. No examples are known; the least such n is greater than 3400. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..996
MAPLE
f:= proc(n) local i, j, a, b, x, y;
x:= 10^n-1;
for i from 0 to n-1 do
for a from 1 to 9 do
y:= x - a*10^i;
if isprime(y) then return y fi;
od od;
for i from 1 to n-1 do
for a from 1 to 9 do
for j from 0 to i-1 do
for b from 1 to 9 do
y:= x - a*10^i - b*10^j;
if isprime(y) then return y fi
od od od od;
FAIL
end proc:
map(f, [$1..30]); # Robert Israel, Dec 16 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, May 17 2010
EXTENSIONS
Corrected and more terms by Robert Israel, Dec 16 2024
STATUS
approved