A283209 Primes of the form 299...977...7 with at least one 9 and one 7.
299777, 299977, 29999777, 299999977, 2999999777, 299999999777, 2999977777777, 299999999999977, 2999999999977777777, 2999999999999999977, 299999999999977777777, 299999999999999999977, 2999999999999999777777
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..868
Programs
-
Mathematica
Sort@ Select[Map[FromDigits@ Join[{2}, ConstantArray[9, #1], ConstantArray[7, #2]] & @@ # &, Select[Tuples[Range@ 20, 2], Times @@ Boole@ Map[OddQ, #] == 0 &]], PrimeQ] (* Michael De Vlieger, Mar 06 2017 *)
-
PARI
do(n)=my(v=List(),p=29,q); for(d=3,n, p=10*p+7; q=p; forstep(i=d-3,1,-1, if(ispseudoprime(q+=2*10^i), listput(v,q)))); Vec(v) \\ Charles R Greathouse IV, Mar 06 2017
Extensions
More terms from Charles R Greathouse IV, Mar 06 2017
Comments