1
   

Number Theory

 
 
RK4
 
Reply Wed 9 Nov, 2005 10:16 pm
Devise a test for integers represented in base b notation to check for divisibility by n, where n is a divisor of b^2 + 1
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 740 • Replies: 2
No top replies

 
kingofmen
 
  1  
Reply Thu 10 Nov, 2005 03:26 am
interesting problem. This is my finding for the anwer
Let X=XmXm-1Xm-2.....X1X0 be the number in base b. (where 0<=Xi<=b-1 because X is written in base b)
We will devise a test for disibility of X by n.
X can be rewritten as :
X = X0 + X1xb + X2xb^2 +X3xb^3+ .....+Xmxb^m (1)

Let us consider n
n is a divisor of b^2+1, hence b^2+1 = k x n (k is integer)
and b^2 = k x n -1

Replace b^2 in (1) by k x n -1, we obtain

X = X0 + X1xb + X2 x (k x n -1) + X3 x b x(k x n -1) +...+Xm x b^(m-2) x (k x n -1)
X = k x n x[X2 + X3 x b+....+Xm xb^(m-2)] +
X0 + X1xb - X2 - X3xb -.......- Xmxb^(m-2)
enlighted?
to see if X is divisible by n we only need to check if [X0 + X1xb - X2 - X3xb-......- Xmxb^(m-2)] is divisible by n

X0 + X1xb - X2- X3xb -.......- Xmxb^(m-2) = - [ (X2-X0)+ (X3-X1)xb+.....Xmxb^(m-2)]
[ (X2-X0)+ (X3-X1)xb+.....Xmxb^(m-2)] in base b is written as XmXm-1.......X4(X3-X1)(X2-X0)
Now we have the same poblem with the first one but with different number. That is devise a test to check if XmXm-1...X4(X3-X1)(X2-X0) is divisible by n, where n is a divisor of b^2+1
By the same token, it leads us to another analogous problem:
Devise a test to check if XmXm-1...X6[X5-(X3-X1)][X4-(X2-X0)] is divisible by n
and so on ....
Finally we only have to check if the number [Xm-(Xm-2-(Xm-4........)))][Xm-1-(Xm-3-(Xm-5-........)))] is divisible by n
or check if
[Xm-Xm-2+Xm-4-Xm-6........][Xm-1-Xm-3+Xm-5-Xm-7......] is divisible by n
or check if
[Xm- Xm-2 + Xm-4 - Xm-6 +........]x b +[Xm-1 - Xm-3 + Xm-5 - Xm-7+......] is divisible by n, which is easily to check

I hope u understand what i wrote Sad because i don't know how to describe mathematical notation with this editor
0 Replies
 
RK4
 
  1  
Reply Thu 10 Nov, 2005 05:30 pm
Hi! Thank you so much for the response and for all the effort put in typing it. You did an amazing job even without using LaTEX or any other equivalent typing language.
0 Replies
 
 

Related Topics

Evolution 101 - Discussion by gungasnake
Typing Equations on a PC - Discussion by Brandon9000
The Future of Artificial Intelligence - Discussion by Brandon9000
The well known Mind vs Brain. - Discussion by crayon851
Scientists Offer Proof of 'Dark Matter' - Discussion by oralloy
Blue Saturn - Discussion by oralloy
Bald Eagle-DDT Myth Still Flying High - Discussion by gungasnake
DDT: A Weapon of Mass Survival - Discussion by gungasnake
 
  1. Forums
  2. » Number Theory
Copyright © 2025 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 05/02/2025 at 08:56:35