login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124113 a(n) = largest composite number of n decimal digits that becomes prime by decreasing any one of the higher-order digits. 1
99, 987, 9951, 99939, 996983, 9981153, 99745289, 981196517, 9927756573, 99243774623, 992617385333, 9751651447377 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
a(n) == 0 (mod 7) for n > 6.
What is the first n for which a(n) does not exist? Rough heuristics suggest before 20. - Charles R Greathouse IV, Nov 18 2010
LINKS
EXAMPLE
a(5)=99939 is included as 99929, 998939, 98939 and 89939 are primes.
PROG
(PARI) A124113(d)={
forstep(n=10^d-1, 10^d\9, [-2, -4, -2, -2],
if(isA124113(n, d), return(n))
)
};
isA124113(n, d)={
if(n%3==1, return(0));
for(i=1, d-1,
if(!isprime(n-10^i), return(0))
);
my(v=eval(Vec(Str(n))));
for(i=1, #v,
if(v[i]==0, return(0))
);
!isprime(n)
};
CROSSREFS
Sequence in context: A177686 A135219 A182672 * A223157 A223155 A308466
KEYWORD
hard,nonn,base
AUTHOR
Anton Vrba (antonvrba(AT)yahoo.com), Nov 29 2006
EXTENSIONS
a(2) corrected, a(7) inserted, and a(11)-a(12) added by Charles R Greathouse IV, Nov 15 2010
a(13) added by Charles R Greathouse IV, Nov 17 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:23 EDT 2024. Contains 371971 sequences. (Running on oeis4.)