login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A108837
Primes of the form 5*10^n-7.
2
43, 4993, 49993, 499999993, 499999999999993, 49999999999999993, 4999999999999999999999993, 49999999999999999999999999999999999999999999999999999999999993
OFFSET
1,1
COMMENTS
Primes such that the leftmost digit is 4, the rightmost digit is 3, and all inner digits are 9.
FORMULA
a(n) = 5*10^A103002(n) - 7.
MATHEMATICA
Select[Table[FromDigits[Join[PadRight[{4}, n+1, 9], {3}]], {n, 0, 150}], PrimeQ] (* Harvey P. Dale, Feb 01 2012 *)
PROG
(PARI) n10np9(n, d) = { local(x, y, k); for(x=1, n, for(k=1, 8, y=10^(x+1)*k+(10^x-1)*10+k-1; if(isprime(y), print1(y", ")) ) ) }
(Magma)[a: n in [1..250]|IsPrime(a) where a is (5*10^n-7)] // Vincenzo Librandi, Dec 11 2010
(PARI) for(n=4, 99, if(ispseudoprime(t=10^n/2-7), print1(t", "))) \\ Charles R Greathouse IV, Feb 01 2012
CROSSREFS
Sequence in context: A110704 A060485 A081795 * A091748 A208625 A147522
KEYWORD
easy,nonn,base
AUTHOR
Cino Hilliard, Jul 11 2005
EXTENSIONS
Edited by Ray Chandler, Feb 03 2012
Comments amended by Harvey P. Dale, Feb 03 2012
STATUS
approved