Jump to content

Prime numbers quicky


YT2095

Recommended Posts

C'mon, that should be really easy to answer.

 

Any number ending with 2,4,6,8 or 0 will always be divisible by 2, and hence can't be a prime.

 

Similarly, numbers ending with 5 will always be divisible by 5.

 

That leaves numbers ending with 1,3,7 and 9.

Link to comment
Share on other sites

statistically the number 1 as a digit occurs in more numbers than any of the other 9 digits.

 

I would write a program to find the answer to this question but since I`m writing on an old BBC Micro it may be a little difficult to parse and each line to do so will make it even slower running than it already is.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.