Hi Guys
I do these days an analytical research and i need some of help in this issue
I need to find a way to extract the prime factors of numbers with some special conditions .. Let's take an example to make it much more clear
IF i have an an integer number .. let's say 12682
I want to divide 12682 to a specific prime factors
let's say all prime factor which equal to or less than 5 .. the prime factors in this case consist of 2 , 3 , 5 .. any prime number more than 5 will be excluded
However , in some phases the result will not be divisible by 2 , 3 , 5
So this time we will use deduction in stead of division and we will determine a specific number to be used for all deduction calculations in next phases
we will use 7 for all deduction calculations and the process will continue on the same way for all next computational phases until we get to 1
12682 ÷ 2 = 6341
6341 - 7 = 6334
6334 ÷ 2 = 3167
3167 - 7 = 3160
3160 ÷ 2^3 = 395
415 ÷ 5 = 79
79 - 7 = 72
72 ÷ 2^3 = 9
9 ÷ 3^2 = 1
Note :: all result is INTEGER Number
Now , What is the best way to do these calculation and showing it in this sequence ?
so i can know how many time i use 2 , 3 and 5 in division
and how many time i use 7 in deduction
I am sure I will hear a brilliant answer from you , Don't disspoint me
Best Regard
I do these days an analytical research and i need some of help in this issue
I need to find a way to extract the prime factors of numbers with some special conditions .. Let's take an example to make it much more clear
IF i have an an integer number .. let's say 12682
I want to divide 12682 to a specific prime factors
let's say all prime factor which equal to or less than 5 .. the prime factors in this case consist of 2 , 3 , 5 .. any prime number more than 5 will be excluded
However , in some phases the result will not be divisible by 2 , 3 , 5
So this time we will use deduction in stead of division and we will determine a specific number to be used for all deduction calculations in next phases
we will use 7 for all deduction calculations and the process will continue on the same way for all next computational phases until we get to 1
12682 ÷ 2 = 6341
6341 - 7 = 6334
6334 ÷ 2 = 3167
3167 - 7 = 3160
3160 ÷ 2^3 = 395
415 ÷ 5 = 79
79 - 7 = 72
72 ÷ 2^3 = 9
9 ÷ 3^2 = 1
Note :: all result is INTEGER Number
Now , What is the best way to do these calculation and showing it in this sequence ?
so i can know how many time i use 2 , 3 and 5 in division
and how many time i use 7 in deduction
I am sure I will hear a brilliant answer from you , Don't disspoint me
Best Regard
Last edited: