Roddy MacPhee

Sep 13, 2024 21:47
@user5349916 care to link me up to a terminology table on wikipedia ?
Sep 13, 2024 21:44
I'm not trying to compare with C really but it might be cool
Sep 13, 2024 20:49
I believe that's why python ( interpretted) is slower than it's potential
Sep 13, 2024 20:45
I don't know proper terms. I explained what double pass is, what's difficult about single or double pass. Double pass is asymptotically linear in the number of conditions, single is potentially logarithmic to the number of conditions because each check stops unwanted data from going through more.
Sep 13, 2024 19:49
Maybe @kaya3 knows ?
Sep 13, 2024 19:25
@MisterMiyagi what is the correct form for such a question ? Is it better to have single pass or double pass logic in a language ,why or why not
Sep 13, 2024 16:41
Okay eliminated the header comments. Having tried 3 assembly languages if/else and recursion/goto is how they make loops.
Sep 13, 2024 16:08
Just wanted discussion of fast code. Double pass versus single pass is what I know about.
Sep 13, 2024 16:05
Maybe a header etc will be faster still
Sep 13, 2024 15:56
Language speed depends on it. But I only asked here because I was suggested off topic for other exchanges.
Sep 13, 2024 15:55
Also double pass means order of conditions doesn't matter they all still get tested. Whereas single or less pass order starts to matter. $$\sum_{i=1}^kc_it_i$$ will get minimized
Sep 13, 2024 15:55
@kaya3 it's able to use Only if A check B
Sep 13, 2024 15:55
I was interested in headers that are faster and more efficient than making it from scratch.
Sep 13, 2024 15:55
PARI/GP used && and || for logic operations and & and | for bit logic. It was then realized that the normal logic can be sped up by using nested conditionals.
Sep 13, 2024 15:55
@kaya3 mersenneforum.org/node/22965 shows it's which operators that matter
Sep 13, 2024 15:55
Looks like it @MisterMiyagi
Sep 13, 2024 15:55
An and gate can be stopped any time one of the inputs is false. Or is true anytime any of it's inputs is. etc.
Sep 13, 2024 15:55
My point is in some languages you can stop early.
Sep 13, 2024 15:55
Double pass logic takes two full passes through the conditions. You can shortcut by $$\neg (A \land B)\implies \neg A\lor \neg B$$
Sep 13, 2024 15:55
@MisterMiyagi added explanation
Sep 13, 2024 15:55
I might as well never have questions if this isn't the the place to ask them...
 
May 25, 2024 18:40
We know p is greater than the the greatest prime in a product ...
 
 
Jan 28, 2024 20:14
Doh realized mod 9 it doesn't actually work. As 3 is not coprime...
Jan 28, 2024 20:12
Other thought is mod 5(order 4) to check exponent mod 4 and total mod 5
Jan 28, 2024 20:05
Yeah. I post things to mersenneforum from time to time. I'm considered a crank though.
Jan 28, 2024 20:01
Not usefully
Jan 28, 2024 20:00
No, I'm mathematically stupid. The idea for exponents prime is to use Euler totient mod 9 that's 6 so any multiple of 6 exponent is 1 mod 9. So it falls to 1 or 5 mod 6 being $3^1$ or 3^5$ mod 9. Just add 1 and divide by 4...
Jan 28, 2024 19:57
In mod 9: (3^(6k+1)+1)/4 is ( 4 mod 9) over 4; (3^(6k+5)+1)/4 is ( 1 mod 9) over 4
Jan 28, 2024 19:57
$y\equiv 1\pmod 6\implies 9y-2\equiv 7 \pmod {54}$
Jan 28, 2024 19:57
$\frac{3^n+1}{4}=y\implies 3^n+1=4y\implies 3^n=4y-1$ then noting only odd n create integers we multiply by 9 getting $3^{n+2}=36y-9$ which then goes to $\frac{3^{n+2}+1}{4}=\frac{36y-8}{4}=9y-2$ we then apply the iterated function...
Jan 28, 2024 19:57
Iterated function for the integer values of the expression is 9y-2 leading to 9^n+(9^n-1)/(9-1)*(-2) ... en.m.wikipedia.org/wiki/Iterated_function
 
Jan 10, 2024 18:27
@mick because the squares of primes are 1 mod 24... youtu.be/ZMkIiFs35HQ?si=5wcXKTcCqI-xLOZh
Jan 10, 2024 18:27
$$q_n\equiv 23\pmod {24}$$ I'm not from a university either... contact neil sloane ?
 
Dec 10, 2023 00:13
If there are two equivalent for k we have a expression we can equate to 0. Start there maybe.
Dec 10, 2023 00:08
Meanwhile to even powers we get 1 mod 8 and 1 mod 12 respectively
Dec 10, 2023 00:00
Got it yet?
Dec 9, 2023 23:54
3 mod 4 raised to an odd power is 3 mod 4. Same with 5 mod 6 to an odd power...
Dec 9, 2023 23:52
is to* show that modular arithmetic can't always fit infinite values. That's part of the idea behind diophantine equation solutions
Dec 9, 2023 23:51
The idea is th
Dec 9, 2023 23:50
It restricts us. We can prove something about one of the $c_i$
Dec 9, 2023 20:18
Odd times odd is odd, so the only way to get k odd is for an odd number of $c_i$ are odd, for i not 1. The first term is always even. But the $c_i$ must add up to b. If b is odd the same argument as for k applies. Otherwise the only $c_i$ to change is $c_1$
Dec 9, 2023 20:15
Do you understand why k and b opposite parity leads to $c_1$ being odd ? Maybe you can generalize the parity conditions.
Dec 9, 2023 20:15
Eg. k and b opposite parity leads to $c_1$ being odd.
Dec 9, 2023 20:15
There are fixed ways to brute force a k value.
 
Nov 25, 2022 13:54
Also, too many cases to do it either way.
Nov 19, 2022 23:41
No I'm on a phone so no speed
Nov 19, 2022 17:01
forfactored(x=2,100,if(x[1]%2,print(x[2][1,1]*x[1]+1),print(x[1]/2)))
Nov 19, 2022 14:56
Proof is in as follows $$pn+1\equiv 0 \pmod 4\implies pn\equiv 3\pmod 4$$
 
Nov 21, 2022 14:43
We need $p$ and $n$ to be incongruent modulo 4, to have a chance at falling below a start value.