mersenneforum.org  

Go Back   mersenneforum.org > Search Forums

Showing results 1 to 25 of 31
Search took 0.01 seconds.
Search: Posts Made By: BrainStone
Forum: Programming 2020-03-18, 15:58
Replies: 51
Views: 5,249
Posted By BrainStone
Is it possible that [$]\exists S \left( n \right)...

Is it possible that [$]\exists S \left( n \right) \equiv 1 \mod M_p[/$], where
[$]S \left( 1 \right) = 4 \\
S \left( n + 1 \right) = {S \left( n \right)}^2 - 2 \\
M_p = 2^p - 1 \\
n < p, n \in...
Forum: Programming 2020-03-18, 14:31
Replies: 51
Views: 5,249
Posted By BrainStone
What error did I do? I was upfront about that I...

What error did I do? I was upfront about that I know that what I'm doing isn't productive after my choice of programming language and library was (correctly) critizised the first time. I've then...
Forum: Programming 2020-03-18, 14:21
Replies: 51
Views: 5,249
Posted By BrainStone
Do I understand correctly that there are cases...

Do I understand correctly that there are cases that consequently allow it to become 1?
Forum: Programming 2020-03-18, 14:16
Replies: 51
Views: 5,249
Posted By BrainStone
I fully agree with your reasoning (Turns out that...

I fully agree with your reasoning (Turns out that was wrong. That's why I like to ask knowledgable people ;) ). But practically impossible doesn't mean impossible. I mean Mersenne Primes become...
Forum: Programming 2020-03-18, 14:12
Replies: 51
Views: 5,249
Posted By BrainStone
We're well past critizism. We're at the point...

We're well past critizism. We're at the point that I quite frankly feel ridiculed. And most of the thread has been critizism of futile points and things not related to the question.
There's a saying...
Forum: Programming 2020-03-18, 13:19
Replies: 51
Views: 5,249
Posted By BrainStone
Yes there was. This wasn't a question about...

Yes there was. This wasn't a question about programming but rather about certain edge cases. The programming part was merely providing context as to why I was interested in it.



I fail to see...
Forum: Programming 2020-03-17, 23:39
Replies: 51
Views: 5,249
Posted By BrainStone
That fixed it. Now the only thing is making...

That fixed it. Now the only thing is making benchmarks. Thank you
Forum: Programming 2020-03-17, 22:27
Replies: 51
Views: 5,249
Posted By BrainStone
That is a fair bit above my knowledge. Could you...

That is a fair bit above my knowledge. Could you elaborate?

Also @bearnol would you putting your doubts about his statements into words here too?

The programming discussion may continue here:...
Forum: Programming 2020-03-17, 22:26
Replies: 51
Views: 5,249
Posted By BrainStone
Continuation of: Can the subtraction in the lucal lehmer test ever return a negative value?

The original topic (https://www.mersenneforum.org/showthread.php?t=25373) which was about certain edge cases in the Lucas-Lehmer-Test derailed fairly quickly and I'd like to continue the programming...
Forum: Programming 2020-03-17, 16:26
Replies: 51
Views: 5,249
Posted By BrainStone
Don't worry. I'll open a new thread myself there...

Don't worry. I'll open a new thread myself there soon.
Forum: Programming 2020-03-17, 16:08
Replies: 51
Views: 5,249
Posted By BrainStone
I'm perfectly happy have the programming part of...

I'm perfectly happy have the programming part of this discussion moved somewhere else.

Though I do believe the question if [$]\exists S \left( n \right) \equiv 1 \mod M_p[/$] belongs here.
Forum: Programming 2020-03-17, 15:47
Replies: 51
Views: 5,249
Posted By BrainStone
Because my question is if there's ever a case...

Because my question is if there's ever a case where [$]S(n) \equiv 1 \mod M_p[/$]. Why I am asking this is merely giving context.
Forum: Programming 2020-03-17, 15:44
Replies: 51
Views: 5,249
Posted By BrainStone
public static final BigInteger fastMod(BigInteger...

public static final BigInteger fastMod(BigInteger number, BigInteger candidate, int prime) {
return number.and(candidate).add(number.shiftRight(prime));
}


number is the [$]S[/$] in...
Forum: Programming 2020-03-17, 13:45
Replies: 51
Views: 5,249
Posted By BrainStone
That calculation does not seem to work.

That calculation does not seem to work.
Forum: Programming 2020-03-17, 13:33
Replies: 51
Views: 5,249
Posted By BrainStone
Of course. As I said I've seen libraries that...

Of course. As I said I've seen libraries that implement their mod to behave like the % operator would.



No, I haven't. I'll certainly give this a try.



Whether I waste my time or not is...
Forum: Programming 2020-03-17, 13:21
Replies: 51
Views: 5,249
Posted By BrainStone
I never claimed it was a good choice. My...

I never claimed it was a good choice.
My concerns about negative numbers are independent of that hower because calculating the modulus like I described is fairly common in computer science. And...
Forum: Programming 2020-03-17, 13:06
Replies: 51
Views: 5,249
Posted By BrainStone
R.D. Silverman, I have a fair understanding of...

R.D. Silverman, I have a fair understanding of modulus and equivalence classes.
And I do know that the iteration is [$]S \left( n + 1 \right) \equiv \left( {S \left( n \right)}^2 - 2 \right) mod...
Forum: Programming 2020-03-17, 12:16
Replies: 51
Views: 5,249
Posted By BrainStone
I feel stupid now... In any case I'm...

I feel stupid now...


In any case I'm wondering if that value of 1 (or -1) could ever be reached in the first place, as a search with primes up to around 7000 hadn't resulted in any of such cases
Forum: Programming 2020-03-17, 11:13
Replies: 51
Views: 5,249
Posted By BrainStone
I'm performing a LL test. So there's always the...

I'm performing a LL test. So there's always the subtraction before the next squaring.
Forum: Programming 2020-03-17, 10:50
Replies: 51
Views: 5,249
Posted By BrainStone
Can the subtraction in the lucal lehmer test ever return a negative value?

I am currently working on this lovely project: https://github.com/BrainStone/MersennePrime-Benchmark
And naturally I'd like to make sure that my LL implementations are correct. Now I've been...
Forum: Computer Science & Computational Number Theory 2018-07-31, 21:14
Replies: 8
Views: 862
Posted By BrainStone
Yeah. I stumbled across the second and was...

Yeah. I stumbled across the second and was thinking about updating the implementation to C++. Aka making use of the GMP-C++ Wrapper GMPXX.



I might also look into the other algorithms.

...
Forum: Computer Science & Computational Number Theory 2018-07-30, 22:33
Replies: 8
Views: 862
Posted By BrainStone
I know trial division is painfully slow. And from...

I know trial division is painfully slow. And from my tests [$]mpz_probab_prime_p(n,trials)[/$] is decently fast, though I don't like probalistic results. From my research I stumbled across the AKS...
Forum: Computer Science & Computational Number Theory 2018-07-30, 20:27
Replies: 8
Views: 862
Posted By BrainStone
I feel stupid now xD Yup that's a good idea....

I feel stupid now xD
Yup that's a good idea. Twin primes might be a good idea as that makes sure the code doesn't stop one number short.







Thanks for these resources!
Forum: Computer Science & Computational Number Theory 2018-07-30, 18:58
Replies: 8
Views: 862
Posted By BrainStone
Good numbers to verify primality check

Hi, I'm currently writing code to play around with truncatable primes. Since some get fairly large I naturally want I decently fast and correct primality check.


Now I want to use some basic unit...
Forum: Mlucas 2017-11-18, 23:38
Replies: 14
Views: 3,448
Posted By BrainStone
Well GitHub is a great platform. And git (or some...

Well GitHub is a great platform. And git (or some other scm) should be used to develop software anyways :P
Showing results 1 to 25 of 31

 
All times are UTC. The time now is 21:04.

Sat Aug 8 21:04:39 UTC 2020 up 22 days, 16:51, 1 user, load averages: 1.44, 1.50, 1.42

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.