login
a(n) is the smallest m such that m < 10^n, 10^n + m is prime and if the natural number k is such that 1 < k < 10 and 3 doesn't divide k*10^n + m then k*10^n+m is prime.
0

%I #10 Mar 25 2023 22:56:46

%S 3,57,297,177,237,25111,231339,67419,273817,345111,2001753,912277,

%T 5236153,9228627,10599391,2835261,60120003,14054037,27923629,41783347,

%U 24590943,112161513,230484021,11446969,205242589,583389307,873650007

%N a(n) is the smallest m such that m < 10^n, 10^n + m is prime and if the natural number k is such that 1 < k < 10 and 3 doesn't divide k*10^n + m then k*10^n+m is prime.

%C a(n) is the smallest m such that m < 10^n and all six numbers 10^n + m, (Mod[m, 3]+2)*10^n + m, 4*10^n + m, (Mod[m, 3]+5)*10^n + m, 7*10^n + m & (Mod[m, 3]+8)*10^n + m are primes.

%C Carlos Rivera in Puzzle 245 of www.primepuzzles.net wrote "if the Faride's results ( a(n) for n=1,...,24 ) are plotted in Excel and a trend 'potential' function is asked, we obtain that a(n) is approximately equal to 0.5*n^6; this means that for n=999 a(n)=5*10^17, approximately." Since 10^n+a(n) is prime, for each n a(n)=0 (mod 3) or a(n)=1 (mod 3).

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_245.htm">Puzzle 245. As 13 </a>

%F a[n_] := (For[m=1, !PrimeQ[10^n+2m-1]||!PrimeQ[(Mod[2m-1, 3]+2)10^n+2m-1]||! PrimeQ[4*10^n+2m-1]||!PrimeQ[(Mod[2m-1, 3]+5)10^n+2m-1]||!PrimeQ [7*10^n+2m-1]||!PrimeQ[(Mod[2m-1, 3]+8)10^n+2m-1], m++ ];2m-1)

%e a(6)=25111 because all the six numbers 1025111, 3025111, 4025111, 6025111, 7025111, 9025111 are primes and 25111 is the smallest number with this property.

%t a[n_] := (For[m=1, !PrimeQ[10^n+2m-1]||!PrimeQ[(Mod[2m-1, 3]+2)10^n+2m-1]||! PrimeQ[4*10^n+2m-1]||!PrimeQ[(Mod[2m-1, 3]+5)10^n+2m-1]||!PrimeQ [7*10^n+2m-1]||!PrimeQ[(Mod[2m-1, 3]+8)10^n+2m-1], m++ ];2m-1); Do[Print[a[n]], {n, 32}]

%Y Cf. A003617, A033873.

%Y Cf. A091199.

%K nonn

%O 1,1

%A _Farideh Firoozbakht_, Dec 26 2003