login
A108824
Primes such that the outer 2 digits are n and n+1 and all inner digits are 7, where 0 < n < 9.
0
677, 8779, 27773, 67777, 8777779, 27777777773, 67777777777, 67777777777777, 67777777777777777777777777, 87777777777777777777777777777779, 8777777777777777777777777777777777779
OFFSET
1,1
COMMENTS
Because prime numbers must end in odd digits other than 5, the only beginning/end digits combinations that satisfy the definition are (2,3), (6,7), and (8,9). [From Harvey P. Dale, Jan 29 2012]
FORMULA
a(x) = 10^(x+1)*n+floor(10^x*7/9)*10+n+1. Output if a(x) is prime.
MATHEMATICA
Select[Flatten[Table[{FromDigits[Join[PadRight[{2}, n, 7], {3}]], FromDigits[ Join[PadRight[{6}, n, 7], {7}]], FromDigits[ Join[PadRight[ {8}, n, 7], {9}]]}, {n, 2, 70}]], PrimeQ] (* Harvey P. Dale, Jan 29 2012 *)
PROG
(PARI) n10np1(n) = { local(x, y, k); for(x=1, n, for(k=1, 8, y=10^(x+1)*k+floor(10^x*7/9)*10+k+1; if(isprime(y), print1(y", ")) ) ) }
CROSSREFS
Sequence in context: A158386 A031730 A205749 * A205471 A144381 A097773
KEYWORD
easy,nonn,base
AUTHOR
Cino Hilliard, Jul 11 2005
STATUS
approved