Questions on the number-theoretic functionality of Mathematica.
25
votes
2answers
3k views
What is so special about Prime?
When we try to evaluate Prime on big numbers (e.g. 10^13) we encounter the following issue :
...
17
votes
4answers
514 views
Why does Mathematica claim there is no even prime?
I wonder if this is a bug, or if I'm misunderstanding something:
Exists[n, EvenQ[n] && PrimeQ[n]] // Resolve
(*
==> False
*)
So if I interpret this ...
6
votes
1answer
295 views
Evaluate continued fraction
Mathematica has the ContinuedFraction[] function to give the continued fraction expansion of a rational (or approximation of a real) number. I'm interested in the ...
3
votes
0answers
192 views
Parallel PowerMod
Is there anyway to parallelize the PowerMod function?
Here is my Left-To-Right modular exponentation:
...
27
votes
4answers
765 views
Factorisation diagrams
Here is a way to visualize the factorisation of natural numbers. How do we get this or a similar kind of output using Mathematica?
See the list of images generated for number from 1 to 36:
21
votes
1answer
2k views
Finding long strings of identical digits in transcendental numbers
Introduction
Describing the three main streams of present-day mathematical philosophy (formalism, Platonism and intuitionism) in a well-known book, The Emperor's New Mind, R. Penrose says:
...it ...
9
votes
1answer
306 views
FiniteFields package is very slow. Any fast substitute for Mathematica?
I want to compute the inverse of matrix, say with dimensions $100 \times 100$, defined over a large finite field extension such as $GF(2^{120})$. I am using the package FiniteFields, but Mathematica's ...
18
votes
6answers
775 views
efficient way to count the number of zeros at the (right) end of a very large number
If I want to count the number of zeros at the (right) end of a large number, like $12345!$, I can use something like:
Length[Last[Split[IntegerDigits[12345!]]]]
...
9
votes
5answers
796 views
Fastest square number test
What is the fastest possible square number test in Mathematica 7, both for machine size and big integers?
I presume in version 8 the fastest will be a dedicated C LibraryLink function.
1
vote
3answers
253 views
Generating pairs of additive and multiplicative factors for integers
Given an integer $n$, I want two lists:
a) the set of pairs of the divsors $a,b$ into exactly two factors $n=a\cdot b$,
b) the set of pairs $a,b$ of two summands $n=a+b$.
The code I came up ...
