# Questions tagged [number-theory]

Questions on the number-theoretic functionality of Mathematica.

319 questions
Filter by
Sorted by
Tagged with
67 views

### Converting sequece of code into a function [closed]

I constructed a pretty basic sieve of Eratosthenes and would like to use it as a function rather than copy pasting output, how do I achieve ...
55 views

### Code needed to determine the smallest k that the equation will fail by brute force [closed]

I find one of the suggested solution to this problem a little bit questionable: “If N is divisible by 1, 2, 3,. . . M, then N must also be divisible by M + 1, M + 2, M + 3, . . . M + k for k is a ...
346 views

### Solving a diophantine equation with three variables

Solve this equation using Mathematica: $2^x + 113^y = z^2$, $\operatorname{gcd}(x, y) = 1$.
69 views

### Having a Problem with Manipulate

I'm trying to work out a new way of visualizing the Collatz conjecture (or 3n+1 problem) using the Manipulate feature of Mathematica to show paths that numbers take in the 3n+1 problem in the form of ...
105 views

### Having problems with Manipulate

I'm trying to create a diagram that could be used to visualize the Collatz Conjecture in a new way, but I can't get Manipulate to work in the way I want it to. The goal of the program is to have m ...
124 views

146 views

### How to plot the number of Mersenne Primes lower than a given input?

I would like to plot the number of Mersenne primes (primes of the form $2^n-1$) lower than a given input. I am totally noob to mathematica and I do not know where to start from. I have tried to ...
582 views

### How does Mathematica compute how to write integers as the sum of k non-negative pth integer powers so quickly?

"PowersRepresentations[n,k,p] gives the distinct representations of the integer n as a sum of ...
361 views

### Some information about PrimeQ function

In Mathematica there is a built-in function called PrimeQ which tests given input as True or ...
44 views

### Speak stops on first Hyphen with IntegerName

IntegerName returns the text of an integer. However, when Speak is applied to the result it stops at the fist hyphen. For ...
211 views

### Powers of prime factors of a positive integer $n$ in “Mathematica”?

I would like to find the powers of a prime in the unique prime factorization of an $n$. I want a function $f[n,p]$ such that $n,p$ are given and I need to know what the power of $p$ is. For instance ...
64 views

### MultiplicativeOrder understanding

According to specification, this should find the smallest integer $m$ such that $10^m \, mod \, 16 = 0$, or return unevaluated if there is no such integer. ...
298 views

### Trying to find the numbers which could be shown in 3 different ways using Legendre's three-square theorem

Legendre's three-square theorem states that $n=a^{2}+b^{2}+c^{2}$ if and only if $n$ is not of the form $n = 4^a(8b + 7)$ for integers $a$ and $b$. There are numbers like 54 which can be ...
1k views

### Plotting the sum of two points on an elliptic curve

I am doing an experiment to prove the associativity of the addition of points on an elliptic curve. So far, I have produced a code which allows me to move points on my curve. To find their sum, I ...