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

Home > Numbers
Prime or divisible by 3 (Posted on 2011-12-23) Difficulty: 3 of 5
2011 is a prime year. The last three digits of 2011 are 011. If you put any digit from 0 to 9 in front of 011, then your number will either be prime or divisible by 3.

0011=11=prime
1011=3*337
2011=prime
3011=prime
4011=3*7*191
5011=prime
6011=prime
7011=3^2*19*41
8011=prime
9011=prime

What other 3-digit number has the property that if you put any digit from 0 to 9 in front of it, then it will either be prime or divisible by 3?

See The Solution Submitted by Math Man    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1

   10   for N0=0 to 999
   20   Good=1
   30   for N=N0 to N0+9000 step 1000
   40      if prmdiv(N)<N and N @ 3 > 0 then Good=0
   50   next
   60   if Good then print N0
   70   next
OK
run
 11
 297

The digits of 297 sum to 18, so the number is a multiple of three, and therefore the leading digits 0, 3, 6 and 9 result in multiples of 3, and the rest are primes.

 


  Posted by Charlie on 2011-12-23 15:49:41
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 (22)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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