All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Long chain (Posted on 2015-04-10) Difficulty: 3 of 5
Create a chain of consecutive digits starting with 1 and following 9 by 0: 123456789012345...

How many digits are needed to obtain the 1st prime number?

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Computer says... (spoiler) | Comment 4 of 7 |
chain=1;i=1;
While[!PrimeQ[chain],chain=10*chain+Mod[++i,10]];
Print[chain];Print[IntegerLength[chain]];

12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
123456789012345678901

171




  Posted by Harry on 2015-04-11 06:59:28
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information