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

 Prime or divisible by 3 (Posted on 2011-12-23)
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 No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 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

 Search: Search body:
Forums (1)