%I #33 Sep 08 2022 08:45:19
%S 43,4993,49993,499999993,499999999999993,49999999999999993,
%T 4999999999999999999999993,
%U 49999999999999999999999999999999999999999999999999999999999993
%N Primes of the form 5*10^n-7.
%C Primes such that the leftmost digit is 4, the rightmost digit is 3, and all inner digits are 9.
%H Makoto Kamada, <a href="https://stdkmd.net/nrr/4/49993.htm#prime">Prime numbers of the form 499...993</a>.
%F a(n) = 5*10^A103002(n) - 7.
%t Select[Table[FromDigits[Join[PadRight[{4},n+1,9],{3}]],{n,0, 150}],PrimeQ] (* _Harvey P. Dale_, Feb 01 2012 *)
%o (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",")) ) ) }
%o (Magma)[a: n in [1..250]|IsPrime(a) where a is (5*10^n-7)] // _Vincenzo Librandi_, Dec 11 2010
%o (PARI) for(n=4,99,if(ispseudoprime(t=10^n/2-7),print1(t", "))) \\ _Charles R Greathouse IV_, Feb 01 2012
%Y Cf. A103002, A101739.
%K easy,nonn,base
%O 1,1
%A _Cino Hilliard_, Jul 11 2005
%E Edited by _Ray Chandler_, Feb 03 2012
%E Comments amended by _Harvey P. Dale_, Feb 03 2012
|