Wikipedia:Reference desk/Archives/Mathematics/2015 August 24

= August 24 =

Concatenated primes
Consider the sequence of numbers given by concatenating the first n integers in reverse order (1, 21, 321, 4321...). The first prime value in the sequence occurs when n = 82. I haven't found any more for n <= 500. Are there any more prime numbers in the sequence? Are there infinite primes in the sequence? 150.135.210.86 (talk) 17:24, 24 August 2015 (UTC)


 * I don't know - but the OEIS is a great resource for this kind of thing - see their page and refs on the sequence here . SemanticMantis (talk) 17:52, 24 August 2015 (UTC)


 * Heuristically there should be an infinite number of primes in the sequence: We know that a(n) isn't divisible by 2 and 5, but apart from that it probably behaves like a random integer for primality testing purposes, so by the Prime number theorem the probability that a(n) is prime is approximately $$\frac{2}{1}\cdot\frac{5}{4}\cdot\frac{1}{\ln(a(n))}$$. Excluding the range you've already tested, the expected number of primes remaining in the sequence is $$\sum_{n=501}^\infty 2.5/\ln(a(n))$$. Given that $$a(n) < 10^{n(\log_{10}(n) + 1)}$$ and that $$\sum_{n=2}^\infty \frac{1}{n\ln(n)}$$ diverges, the expected number of primes is infinite. To get an idea how far you'd have to search to have a 50% chance of finding the next example, you could try solving $$\sum_{n=501}^N 2.5/\ln(a(n)) \geq 1$$ for N with a computer. Egnau (talk) 22:42, 25 August 2015 (UTC)


 * oeis:A176024 says the next term is for n = 37765, found by Eric W. Weisstein in 2010. It has 177719 digits and is only a probable prime so far. PrimeHunter (talk) 01:09, 26 August 2015 (UTC)


 * The corresponding sequence base 2 contains primes for n = 2, 3, 4, 7 at least. --JBL (talk) 23:02, 26 August 2015 (UTC)
 * Up to $$n=1000$$ we have 2, 3, 4, 7, 11, 13, 25, 97, 110. Strangely, this sequence isn't in OEIS. -- Meni Rosenfeld (talk) 10:01, 28 August 2015 (UTC)