login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077362 Largest n-digit prime whose external digits as well as internal digits form a prime, or 0 if no such number exists. 2
0, 0, 977, 9677, 99377, 998717, 9998777, 99999617, 999999017, 9999996437, 99999997397, 999999997277, 9999999986477, 99999999993317, 999999999997337, 9999999999990797, 99999999999998837, 999999999999995717 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Conjecture: no entry is zero for n>2.

Conjecture: each term after the first two terms ends with 7. - Harvey P. Dale, May 26 2018

LINKS

Harvey P. Dale, Table of n, a(n) for n = 0..100

MATHEMATICA

LastDigit[n_] := n - 10*Floor[n/10]; FirstDigit[n_] := Floor[n/(10^(Ceiling[Log[10, n]] - 1))]; MiddleDigits[n_] := Floor[(n - Floor[n/(10^(Ceiling[Log[10, n]] - 1))]*10^(Ceiling[Log[10, n]] - 1))/10]; IntExtPrimeTest2[n_] := TrueQ[(Boole[PrimeQ[FirstDigit[n]*10 + LastDigit[ n]]] + Boole[PrimeQ[MiddleDigits[n]]] + Boole[PrimeQ[n]]) == 3]; finder[digits_] := (maxj = 10^digits; For[j = maxj, IntExtPrimeTest2[j] == False, j-- ]; Print[j]); Do[finder[n], {n, 3, 25}] - Joshua Albert (jba138(AT)psu.edu), Feb 22 2006

eidQ[n_]:=Module[{idn=IntegerDigits[n]}, AllTrue[{FromDigits[Join[ {idn[[1]]}, {idn[[-1]]}]], FromDigits[Most[Rest[idn]]]}, PrimeQ]]; Join[ {0, 0}, Table[Module[{np=NextPrime[10^n-1, -1]}, While[ !eidQ[np], np = NextPrime[ np, -1]]; np], {n, 3, 18}]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 26 2018 *)

CROSSREFS

Cf. A069686, A077359, A077360, A077361.

Sequence in context: A288917 A264130 A282405 * A077380 A063052 A231708

Adjacent sequences:  A077359 A077360 A077361 * A077363 A077364 A077365

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Nov 05 2002

EXTENSIONS

Corrected and extended by Joshua Albert (jba138(AT)psu.edu), Feb 22 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 05:14 EST 2019. Contains 329839 sequences. (Running on oeis4.)