![]() |
[QUOTE=CRGreathouse]I must be interpreting you the wrong way, then, since I find 17 million instances below 10[sup]20[/sup]:
[/QUOTE] No, sm88 was searching from 1 to 10[sup]20[/sup] Also: I can rig the number to be semiprime: Here's an example: [code]55762113159666605738616781764882446662982216262889524965004140441546022418664991294967299112901478710275915859674894915215729565500652173245752458035579997432840192000000000000000000000001 = 5846650401949673788584832661 * 9537446114628590934543506256858833034627998057578048449114232547066222757945489740614277575764557950018685132240750168209560234946900002547179019523457586506941[/code] It's rather cool what you can do with modular exponentiation. Here's a better example: [code]289508238708400855287326405336918749133423298889334502223156944093968*150!+1 = 10254288128120939058918287267226262277004901802104088101537671807691 * 1613053686056875801829683444255478970299912076335944456541386114240383845905441917746506601556683535279149882320681534772255292138166095487502436596518188053218548567074676625073642723441629113007713095460989964369203609983928686506798110902140688105800120704029411[/code] See? I just made a record! :wink: (Imagine someone was in the middle of factoring that one.) |
[QUOTE=3.14159;225319]And you would have continued checking for another few thousand years, because it's in the 10^20 range.[/QUOTE]
He would have hit an instance in a few hours, and a prime instance in a few days, if I calculate correctly. Of course they wouldn't be close to 10^20. |
[CODE]M(x)= a=0;for(n=0,x-1,a=a+M(n));a=a+x;print(a",")[/CODE]
best i can do in coding my equation. |
[QUOTE=CRGreathouse]If you wanted k to be a prime, then[/QUOTE]
Ah: But if you want the cofactor to be prime: [code]forstep(n=1,a,b,if(isprime((n*22!+1)/b), print(n)))[/code] Here's an example: 2386628800 * 60! + 1 = 89[sup]4[/sup] * 316518937978282424919538194794587561257209063707380372243938125981964972473329411361 Ex 2: 1974103215468915131950479405951082163*66!+1 = 71[sup]6[/sup] * 89[sup]4[/sup] * 101[sup]8[/sup] * 12347042307394672596544859365776765192013890088140194548358364707496516846616209505096123905841 |
I know for n>2 MP(n) = 4^k*MP(n-1)+(4^k-1) the hard part is how to define k.
|
only problem with my codes is deep recursion I think it's called.
|
I think if i change it to vectors then ask for the sum of the indexes it might work. but it's never a guarantee with me lol.
|
[QUOTE=science_man_88;225369][CODE]M(x)= a=0;for(n=0,x-1,a=a+M(n));a=a+x;print(a",")[/CODE]
best i can do in coding my equation.[/QUOTE] Did you mean to return the a, rather than printing it? |
[QUOTE=science_man_88;225374]only problem with my codes is deep recursion I think it's called.[/QUOTE]
I'm not sure if the program does what it's intended. If so, then the answer is what you hint at below: memoize the result. [QUOTE=science_man_88;225375]I think if i change it to vectors then ask for the sum of the indexes it might work. but it's never a guarantee with me lol.[/QUOTE] |
[QUOTE=CRGreathouse;225393]Did you mean to return the a, rather than printing it?[/QUOTE]
I've tried both neither give a correct answer for me. |
[QUOTE=science_man_88;225395]I've tried both neither give a correct answer for me.[/QUOTE]
I can't correct the program because I don't know what it's trying to do. But certainly the program isn't doing what you intend if it stores the value it returns but doesn't actually return a value. |
| All times are UTC. The time now is 22:58. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.