Concatenated Primes!

Let A = 0. p 1 p 2 p 3 A=\overline{0.p_1 p_2 p_3 \ldots} , where p n p_n refers to the n n th prime number. What is the 1000th digit of A A after the decimal point?


Clarification:

A A is a decimal made by concatenating primes.


The answer is 1.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Jesse Nieminen
Sep 22, 2016

Let's use functions π ( n ) \pi\left(n\right) (outputs the number of primes less than or equal to n n ) and p ( n ) p\left(n\right) (outputs the n t h n^{th} prime).

Since π ( 10 ) = 4 \pi\left(10\right) = 4 , π ( 100 ) = 25 \pi\left(100\right) = 25 , π ( 1000 ) = 168 \pi\left(1000\right) = 168 and π ( 10000 ) = 1229 \pi\left(10000\right) = 1229 , we know that the prime with the 100 0 t h 1000^{th} digit has 4 4 digits.

Since 1000 1 4 + 2 ( 25 4 ) + 3 ( 168 25 ) = 525 = 4 131 + 1 1000 - 1\cdot4 + 2\left(25-4\right) + 3\left(168-25\right) = 525 = 4\cdot131 + 1 we know that the 100 0 t h 1000^{th} digit is the first digit of 168 + 132 = 30 0 t h 168 + 132 = 300^{th} prime.

Since, p ( 300 ) = 1987 p\left(300\right) = 1987 we know that the answer is 1 \boxed{1} .

I was too lazy to write a program to do this for me, I only needed to check some of these values online and perform some calculations to be able to solve this. :D

Sharky Kesa
Sep 21, 2016

Slick solution on Haskell:

1
2
3
4
5
6
primes = sieve [2..] where
    sieve (p:xs) = p:sieve [x | x <- xs, rem x p > 0]

primestring = concat . map show $ primes
main = do
    putStrLn [primestring !! 999]

how can 1000th prime no. be 1?

A Former Brilliant Member - 4 years, 8 months ago

Log in to reply

Note that I asked for the 1000th digit, not the 1000th prime. Eg, the 10th digit of the number A = 0.235711131719... A=0.235711131719... is 7 7 .

Sharky Kesa - 4 years, 8 months ago

Log in to reply

okay now it's clr.

A Former Brilliant Member - 4 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...