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

Home > Logic
I WONDER (Posted on 2011-01-13) Difficulty: 4 of 5

Read carefully, then post your answer.


Can you provide a simple YES or NO correct answer to the question :
Is 1010101......101 (n ones interwoven with n-1 zeroes) evenly divisible (i.e. without remainder) by 111…1(a string of n ones)?

Rem: n>1

See The Solution Submitted by Ady TZIDON    
Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts re: my solution | Comment 2 of 10 |
(In reply to my solution by Daniel)

The other interpretation would assume the particular value of n is known. If n is odd, then the divisibility is present; if n is even it is not:

list
   10   for N=2 to 15
   20     A=(100^N-1)//99
   30     B=(10^N-1)//9
   40     Q=A//B
   50     print A;B,Q
  100   next
run

Quotient is shown in last column below. Slash is doubled for those that are not integers, due to the way UBASIC displays rationals.


 101  11         101//11
 10101  111      91
 1010101  1111   10001//11
 101010101  11111        9091
 10101010101  111111     1000001//11
 1010101010101  1111111          909091
 101010101010101  11111111       100000001//11
 10101010101010101  111111111    90909091
 1010101010101010101  1111111111         10000000001//11
 101010101010101010101  11111111111      9090909091
 10101010101010101010101  111111111111   1000000000001//11
 1010101010101010101010101  1111111111111        909090909091
 101010101010101010101010101  11111111111111     100000000000001//11
 10101010101010101010101010101  111111111111111          90909090909091
OK

  Posted by Charlie on 2011-01-13 14:24:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (15)
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