7
$\begingroup$

Let P be a prime number and P=$m^{\text{th}}$ prime number. Here I'm interested in a prime P$>2$, such that P divides the concatenation of the first $(2m-1)$ prime numbers. Using my old laptop I've checked P up to $7919$ (i.e: up to the $1000^{\text{th}}$ prime number)without finding a solution. Can you find the smallest /some primes P$>2$ with such property ?

$\endgroup$

migrated from mathematica.stackexchange.com Aug 22 '17 at 1:08

This question came from our site for users of Wolfram Mathematica.

  • $\begingroup$ You are using Mathematica for this? Have you written code already? $\endgroup$ – J. M. is a poor mathematician Aug 19 '17 at 13:18
  • $\begingroup$ No, I did it manually with my laptop. $\endgroup$ – Sarah B Aug 19 '17 at 13:19
  • $\begingroup$ You did it manually? Such effort... $\endgroup$ – George N. Missailidis Aug 22 '17 at 1:39
4
$\begingroup$

Update: Fixed typo (Sahra B.) and used Divisible (J.M.):

Is this the operation you mean?

concatenate[a__] := ToExpression[StringJoin[ToString /@ a]]

f[m_] := concatenate[Prime[#] & /@ Range[1, 2 m - 1]]

f[#] & /@ Range[5]

{2, 235, 235711, 2357111317, 23571113171923}

checkM[m_] := Divisible[f[m], Prime[m]]

Timing[Select[Range[2,2*10^6], checkM[#] &, 1]]

yields:

{0.207871, {303}}

suggesting that the 303th prime satisfies the above check?


You can look at code and actual integers involved [ here ].

$\endgroup$
  • $\begingroup$ Might be better to use Divisible[f[m], m]. $\endgroup$ – J. M. is a poor mathematician Aug 19 '17 at 13:41
  • $\begingroup$ More efficient & easier to read, or functionally different? $\endgroup$ – John Joseph M. Carrasco Aug 19 '17 at 13:43
  • $\begingroup$ Well, taking GCDs needs less effort than performing an actual division for large enough integers. $\endgroup$ – J. M. is a poor mathematician Aug 19 '17 at 13:44
  • $\begingroup$ @JohnJosephM.Carrasco, you mean the $303^{\text{th}}$ prime gives solution ? $\endgroup$ – Sarah B Aug 19 '17 at 13:45
  • 1
    $\begingroup$ I must made an error at some point at the concatenation :( (thanks John !) $\endgroup$ – Sarah B Aug 19 '17 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy