1,316 reputation
1414
bio website
location Southern California
age
visits member for 3 years
seen 13 mins ago

Mostly harmless.


Jan
17
awarded  Yearling
Jan
4
comment IntegerQ and Element Integers give different results in one case
Precisely this is documented in the Details for IntegerQ. "IntegerQ[ expr ] returns False unless expr is manifestly an integer (i.e. has head Integer). Simplify[ expr \[Element]Integers] can be used to try to determine whether an expression is mathematically equal to an integer."
Jan
3
comment Associativity of `/@`
+1 for control-dot. I didn't know about that until now! Thanks.
Jan
2
comment Find the minimum integer r such that $(10^r - 1)/37$ is an integer
The solution using MultiplicativeOrder is the one using "more advanced methods". It is much faster than my constructive approach. Which was already pretty fast.
Jan
2
comment Find the minimum integer r such that $(10^r - 1)/37$ is an integer
So that's how Reduce is doing it. This is now, by far, the best answer here.
Jan
1
comment Find the minimum integer r such that $(10^r - 1)/37$ is an integer
Actually it's really simple. 37 times q gives a sequence of 9's. What would you multiply 7 by to get a 9 in the last digit? 7x7 = 49. So the last digit of q is 7. 7x37 = 259. The next digit in q times 7 plus the 5 in 259 has to give the next 9. So what times 7 ends in a 4? 7x2 = 14. 2x37 = 74. 25+74=99. So for q=27, we have 999. Done! (If we didn't get a 9 in the third digit, then we would just keep going, picking one more digit of the multiplier to give another 9 in that digit of the product. Until we have all 9's.)
Dec
29
revised Find the minimum integer r such that $(10^r - 1)/37$ is an integer
clean
Dec
29
revised Find the minimum integer r such that $(10^r - 1)/37$ is an integer
add comparison with primitive root approach
Dec
29
revised Find the minimum integer r such that $(10^r - 1)/37$ is an integer
add C version
Dec
29
comment Find the minimum integer r such that $(10^r - 1)/37$ is an integer
Though it gave me an idea for a better approach ...
Dec
29
revised Find the minimum integer r such that $(10^r - 1)/37$ is an integer
add PowerMod approach
Dec
29
comment Find the minimum integer r such that $(10^r - 1)/37$ is an integer
Doesn't always work. HasPrimitiveRootQ[582749] returns False, but 582749 has a solution. (See my answer.)
Dec
29
revised Find the minimum integer r such that $(10^r - 1)/37$ is an integer
add timing
Dec
29
revised Find the minimum integer r such that $(10^r - 1)/37$ is an integer
add condition
Dec
29
answered Find the minimum integer r such that $(10^r - 1)/37$ is an integer
Dec
28
comment Definite integral incorrectly giving a nonreal value
I understand. I was venting at Wolfram, not you. The fact that this happens all the time is my beef.
Dec
28
comment Definite integral incorrectly giving a nonreal value
However Mathematica should not need help evaluating that integral, seeing as how Rubi and Maple have no problem with it. This sort of thing is just downright embarrassing when I'm trying to tell people how awesome Mathematica is.
Dec
27
revised Efficient way to generate random points with a predefined lower bound on their pairwise Euclidean distance
clarify
Dec
27
comment Definite integral incorrectly giving a nonreal value
Absolutely! The discontinuity makes the antiderivative useless for calculating integrals.
Dec
27
comment Definite integral incorrectly giving a nonreal value
Interestingly, the derivative of Mma's antiderivative gives $\sqrt{1+x^3}$ almost everywhere. However the antiderivative is discontinuous at $x=2$. There are jumps in both the real and imaginary parts there, which would result in the wrong answer for any definite integral across $x=2$ using that antiderivative.