# Prime factorization, Composite integers.

Describe how to find a prime factor of 1742399 using at most 441 integer divisions and one square root.

So far I have only square rooted 1742399 to get 1319.9996. I have also tried to find a prime number that divides 1742399 exactly; I have tried up to 71 but had no luck. Surely there is an easier way that I am missing without trying numerous prime numbers. Any help would be great, thanks.

-

1
- you need only to test numbers up to $1319$. - test $2$ for even numbers - test $3$ for multiples of $3$ - the remaining numbers will be $1$ or $5 \bmod 6$ – Raymond Manzoni Aug 14 '12 at 20:36
@RaymondManzoni This is undoubtedly what the question had in mind. One can also eliminate multiples of 5 fairly efficiently and reduce the number of divisions by working mod 30. – Mark Bennet Aug 14 '12 at 20:43
Note also that in Raymond's scheme the first divisor you encounter will be prime (this is not entirely trivial). – Mark Bennet Aug 14 '12 at 20:44
@RaymondManzoni Thanks for your help guys. I understand using 2 to test for even numbers and 3 to test for multiples of 3 but I am confused over where the 5 mod 6 comes from. – Apeman Aug 14 '12 at 22:25
a prime number greater than $3$ must be equal to $1$ or $5 \bmod 6$ because a prime (larger than $3$) must be odd i.e. $1,3$ or $5 \bmod 6$. Since $3\bmod 6$ was handled by the case $3$ only remains $1$ and $5$. – Raymond Manzoni Aug 14 '12 at 22:30
show 1 more comment

## 4 Answers

Are you allowed to have a table of prime numbers? There are fewer than 441 such primes below 1320.

You probably aren't supposed to use this method, but 1742399 is nearly a square as you have identified and you can write it as 1742400-1, which is the difference of two squares. This gets you two smaller factors almost for free.

-
• you need only to test numbers up to $1319$.
• test $2$ for even numbers
• test $3$ for multiples of $3$
• the remaining numbers will be $1$ or $5 \bmod 6$
-

2
And testing the remaining numbers in the natural increasing order will mean that the first divisor encountered is a prime. – Mark Bennet Aug 14 '12 at 20:46
– Raymond Manzoni Aug 14 '12 at 21:02
I liked your answer because I could see immediately where the 441 came from. I could factorise the number, but I couldn't identify where the question was coming from, and you did. – Mark Bennet Aug 14 '12 at 21:05
@Mark: in fact I began by dividing $1320$ by $441$ got nearly $3$ and deduced that the modulo $6$ was in play (I played with that long ago so...). Your prime suggestion was more powerful but would have needed the division by nearly $\ln(1320)\approx 7.2$... Cheers, – Raymond Manzoni Aug 14 '12 at 21:11

Note that the problem asks you do describe how you would go about factorizing 1742399 in at most 442 operations. You are not being asked to carry out all these operations yourself! I think your method of checking all primes up to the squareroot is exactly what the problem is looking for, but to be safe you should check that there are no more than 441 primes less than or equal to 1319.

-

Hint $\$ Prime $\rm\:p\neq 2,3\:\Rightarrow\: p\equiv \pm 1\pmod 6$

Remark $\$ For more on sieving see my post here, which includes links to ingenenious mechanical sieving machines devised by Lehmer in the precomputer era, e.g. using bicycles chains, photoelectric devices, etc. Below are some general references.

Wooding, Kjell. The Sieve Problem in One and Two-Dimensions.
PhD Thesis. Calgary, Alberta. April, 2010

Lehmer, D.H. The sieve problem for all-purpose computers, MTAC, v. 7 1953, p. 6-14

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 30, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9433936476707458, "perplexity_flag": "middle"}