Collatz-like problem involving prime factors

243 Views Asked by At

Unfortunately I am not well-versed in LaTeX so I will try my best to keep this looking presentable.

As an overview, I was investigating a variation of the Collatz conjecture:

Define $f(1) = 1$
Then, if $n$ is even, $f(n) = \frac{n}{2}$
Otherwise, let $n$'s smallest prime factor be $p$, then $f(n) = pn+1$

So then I was trying it out for small values:
$f(1) = 1$
$f(2) = 1, f(1) = 1$
$f(3) = 10, f(10) = 5, f(5) = 26, f(26) = 13, ...$ and so on. Eventually you get to $f(213) = 640$ which reduces down to $10$. Evidently, loops/cycles can form.
$f(4) = 2, f(2) = 1$
$f(5) = 26$ which is already a part of $3$'s cycle
$f(6) = 3$ which is, again, part of $3$'s cycle

By now, I was thinking that this function had a nice trend of either reducing to $1$ or joining onto another number's cycle. However, $f(7)$ causes an issue. I have iterated for $f(7)$ around $100$ times using python, however it is still unclear whether $f(7)$ converges or not (for want of a better word).

I also noticed that convergence of $f(9)$ depended on convergence of $f(7)$.

There is no reason why it should converge, I saw on another page that the average smallest prime factor of integers up to $n$ is asymptotic to $\frac{n}{2\log(n)}$. So then $f(n)$ has average order $\frac{n^2}{2\log(n)}$.

My question then is ultimately: for any integer n, will $f(n)$ eventually reach 1 or form a cycle? And, if not, is there an interesting reason/proof why not? This question could be (and probably is) fairly difficult, so as a weaker question, does $f(7)$ converge?

If this question is similar to, or a corollary of, another question asked here, I apologise. Please let me know and I will remove the question.

Edit: I wrote some basic python code to do the computations for me, however, it is not very efficient. With that being said, I also have an interest in the computational complexity of this problem e.g. finding smallest prime factor, checking for repeated values (i.e. checking if a cycle has been formed) etc.

2

There are 2 best solutions below

2
On

Summary of new information that has been commented so far:

  1. The scale of which the iterations can grow really bogs down total computation time, the problem isn't quite prime factorisation but is a weaker form. In most cases, the numbers grow so large that computation beyond them is extremely slow (Thanks to Peter/Gottfried, it is confirmed that $f(7)$ goes as large as ~$10^{100}$)
  2. Thanks to Gottfried, we have a list of non-powers of two that also converges to 1. Namely $\small \begin{array} {rr} n & :&factorization \\ \hline 14941629968793 & : & 3.11.17.53.79.313.20323 \\ 11206222476595 & : & 5.2241244495319 \\ 109435766373 & : & 3^2.12159529597 \\ 20519206195 & : & 5.2129.1927591 \\ 200382873 & : & 3.19.3515489 \\ 150287155 & : & 5.37.812363 \\ 5733 & : & 3^2.7^2.13 \\ 1075 & : & 5^2.43 \\ 21 & : & 3.7 \\ 1 & : & 1 \\ \end{array}$

Any of these numbers multiplied by a power of two will also converge. However, it appears that the smallest prime factor of each of the numbers in the table alternates between 3 and 5 (unknown whether its coincidental or not)

  1. Further exploration of cycles forming, including 1-cycles i.e powers of 2 and Gottfried's list, leads the conclusion to be that convergence onto a cycle is rare. Making divergence the average outcome, rather than an anomalous one.

Perhaps a better question to ask is: other than the cycle generated by 3, do other cycles even exist (not including the 1-cycle)?

0
On

Here is the protocol of odd steps towards the composite 100-digits number in orbit of $f(7)$ (parts of factoring by website of Dario Alpern):

7
25
63
95
119
417
313
48985
122463
183695
229619
373131
559697
44146101
4138697
697370445
261513917
457649355
686474033
600664779
900997169
405897949273007281
7509112061550634699
8511578521767644431317
199490121603929166359
36606437314321002026877
13727413992870375760079
44614095476828721220257
33460571607621540915193
560464574427660810329483
32647061460411242201692385
81617653651028105504230963
3183374154177874713034272365371
30242054464689809773825587471025
75605136161724524434563968677563
113407704242586786651845953016345
283519260606466966629614882540863
2693432975761436182981341384138199
135008327910041988671939736879927225
101256245932531491503954802659945419
1037876520808447787915536727264440545
778407390606335840936652545448330409
209693999344354902686163424239507556384897
183482249426310539850392996209569111836785
458705623565776349625982490523922779591963
688058435348664524438973735785884169387945
1720146088371661311097434339464710423469863
19781680016274105077620494903844169869903425
14836260012205578808215371177883127402427569
678527078995714518306974866213498654795398351
1017790618493571777460462299320247982193097527
5597848401714644776032542646261363902062036399
51080366665646133581296951647134945606316082141
1960209070794170376182270519458803537642379652161
here    we  have    small   factor: 101824765986149436023
24949728739692978946945161249830052752190289743808189025902632899463
37424593109539468420417741874745079128285434615712283538853949349195
23390370693462167762761088671715674455178396634820177211783718343247
6213067215450888311983414178424476027156761606124109571880050184925
2329900205794083116993780316909178510183785602296541089455018819347
here    we  have    small   factor: 2227945361
1297722588772968200438678280727728530021214097513792416649298799182961424817
13950517829309408154715791517823081697728051548273268478979962091216835316783
20925776743964112232073687276734622546592077322409902718469943136825252975175
26157220929955140290092109095918278183240096653012378398087428921031566218969
281190124997017758118490172781121490469831039019883067779439860901089336853917
105446296873881659294433814792920558926186639632456150417289947837908501320219
6906732445239248683785414868936296609665224895925877852332491583383006836474345
17266831113098121709463537172340741524163062239814694630831228958457517091185863
25900246669647182564195305758511112286244593359722041946246843437686275636778795
16187654168529489102622066099069445178902870849826276216404277148553922272986747
89032097926912190064421363544881948483965789674044519190223524317046572501427109
16693518361296035637079005664665365340743585563883347348166910809446232344017583
here    we  have    small   factor: 1016839
8487310258490949790585889520526332713858183400596789517081346710283248725229247540069
14852792952359162133525306660921082249251820951044381654892356742995685269151183195121
40845180618987695867194593317532976185442507615372049550953981043238134490165753786583
here    we  have    small   factor: 666627995560403
13614270442169194190020139872585428969904859746329119083185222702312554870646661973552921055173736475
8508919026355746368762587420365893106190537341455699426990764188945346794154163733470575659483585297
6381689269766809776571940565274419829642903006091774570243073141709010095615622800102931744612688973