All Questions

Filter by
Sorted by
Tagged with
27
votes
1answer
1k views

Fast calculation of discrete logarithms

Does Mathematica have any built-in fast algorithms for calculating discrete logarithms over $(\mathbb{Z}_p)^\times$ (the group of integers modulo $p$)? Essentially, for a fixed large prime ...
14
votes
6answers
6k views

How to find lattice points on a line segment?

How do I find points on the line segment joining {-4, 11} and {16, -1} whose coordinates are positive integers?
13
votes
7answers
2k views

Finding vampire numbers

How to find vampire numbers by using Mathematica? A number $v=xy$ with an even number $n$ of digits formed by multiplying a pair of $n/2$-digit numbers (where the digits are taken from the ...
12
votes
8answers
2k views

Find the minimum integer r such that $(10^r - 1)/37$ is an integer

I know Element[(10^r - 1)/37, Integers] tests the condition. So what is the command that gives me the minimum integer value r ...
9
votes
4answers
396 views

First two n such that $1355297$ divides$10^{6n+5}-54n-46$ for $n>0$

I have problem solving this equation, smallest n such that $1355297$ divides $10^{6n+5}-54n-46$. I tried everything using my scientific calculator, but I never got the correct results(!).and finally I ...
9
votes
1answer
162 views

Modular equation problem

I have problem solving this modular equation $67^n \equiv 67 \pmod {317026939759222841944}$ with $n>1$. I have tried my Laptop and Wolfram Alpha engine, but I don't get any solution, I'm very ...
7
votes
4answers
316 views

Find the order $m$ of a matrix ${\bf A}$ such that ${\bf A}^m= {\bf 1}$

I have a square matrix ${\bf A}$ defined over the field $\mathbb Z_2$ and I want to find its order such that ${\bf A}^m=1$. I tried using ...
6
votes
3answers
310 views

Find the number of $n$ such that $n!$ is a sum of three squares

I want to check the following theorem by using Mathematica: $\textbf{Theorem} $. $\text{The estimate}$ $\# \{n \le x:n! \text{ is a sum of three squares}\}=7x/8+O(x^{2/3})$ $\text{holds.}$...
6
votes
1answer
85 views

Computing the seven roots of a polynomial

This question was originally asked by @fsrong70 six months ago. The OP deleted it shortly after posting and has not returned to this site since. I had just figured it out when it was deleted. I ...
6
votes
2answers
587 views

How can I solve a certain congruence equation?

I want to solve the congruence $3x^2 + 6x + 1 \equiv 0 \pmod {19}$. I know that one way to solve this is to first solve the congruence: $t^2 \equiv 5 \pmod {19}$, because $b^2 - 4ac \equiv 24 \equiv ...
5
votes
1answer
410 views

Solving a Diophantine equation with a large solution

I am trying to solve the following Diophantine equation with Mathematica: $\frac{x}{y+z}+\frac{z}{x+y}+\frac{y}{x+z}=4$ It is known that there are three positive numbers that satisfy the equation ...
4
votes
4answers
207 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 ...
4
votes
5answers
695 views

On finding all the positive integral solutions of $x^2+y^2=z^2+1$

I am a new to Mathematica. My goal is to find many (if not all) positive integer solutions to the equation: $x^2+y^2=z^2+1$ using Mathematica. However the problem is that I can only find a ...
4
votes
1answer
868 views

Why does Solve lock up when trying to solve the quadratic equation with large integers?

Why does Solve lock up when trying to solve the equation ...
4
votes
1answer
258 views

Finding the largest integer that cannot be partitioned in a certain way

I want to use Mathematica to solve the problem: Find the maximum $k$ such that $6x+9y+20z=k$ does not have a non-negative solution. I tried FrobeniusSolve. But ...
3
votes
3answers
643 views

Solving a system of diophantine equations from a mathematical competition

There is a problem from the $66th$ Putnam Mathematical Competition, $B2$ Find all positive integers $n,k_1,k_2,...,k_n$ such that $$k_1+\cdots+k_n=5n-4$$ and $$\frac{1}{k_1}+\cdots+\frac{1}{...
3
votes
3answers
245 views

What is the formula for this numerical series?

I'm developing a questions game. My goal is that the score for each correct answer will increase as the user answers more questions. Initially there are 15 points for each correct answer. Every 4 ...
3
votes
1answer
248 views

Faster Solve for Fermat 4n+1 conjecture

Assuming that Fermat 4n+1 conjecture (each prime of the form 4n+1 is the sum of two squares) is true then I like to solve the ...
3
votes
1answer
90 views

FindInstance only satisfies half of my double inequality

FindInstance[ 298973528525.436 < 10^10*(n - k*3.32192809488736) < 298973528539.862, {n, k}, Integers ] Result is: ...
2
votes
5answers
140 views

How can I find the $c$ such $Max[Fibonacci[Range[c]]] = 13$?

How can I find the $c$ such Max[Fibonacci[Range[c]]] = 13 I tried Reduce but there is an error message ...
2
votes
3answers
335 views

Truncate an infinite continued fraction at order 2000

I want to solve an equation which contains an infinite continued fraction $F(n)$. Then I must (obviously) truncate this continued fraction at $n=2000$. The problem here is that Mathematica does not ...
2
votes
1answer
237 views

Finding all integer solutions of the following inequality $\bigg| \sqrt[3]{2}-\frac{p}{q} \bigg | <\frac{1}{q^{5/2}}$

I want to find integer solutions of the following inequality by using Mathematica $$\bigg| \sqrt[3]{2}-\frac{p}{q} \bigg | <\frac{1}{q^{5/2}}$$ ...
2
votes
2answers
278 views

Quadratic Equations $\bmod p^k$

As part of a larger program, I need to solve $A x^2+B x+C \equiv 0 \pmod {p^k}$ for prime $p$. Right now I'm doing this by calling ...
1
vote
1answer
252 views

How to solve equations in Gaussian integers modulo p

How to solve a complex equation of the form: $$z^n \equiv i \pmod p$$ where $z$ is a Gaussian integer, $i$ is the imaginary number, $n, p \in \mathbb{Z}^+$ and $p$ is prime. I am dealing with quite ...
1
vote
1answer
98 views

Solving a modular equation with a large modulus [duplicate]

I am having trouble solving this equation: $17^n\equiv 1 \mod 640826899755722841329632946651705039010285107743541637238400825304943424424715705661705191669759$ for the smallest integer $n > 0$ I ...
0
votes
0answers
25 views

How to solve equations in Gaussian integers modulo p efficiently [duplicate]

This question is related to my previous question which can be found here. Calling the function sols1 = gaussianPowerModList[I, 8192, 18446744069414584321];] ...
-1
votes
0answers
77 views

Does such prime $P$ exist? [migrated]

The equation $(10^{6n+1}-54n-10)($mod P$) = 0$ , find the value of prime P such that there are AT LEAST 3 solutions for n > 0 , whose values of n are all below (P-1)/6. I don't even know how to solve ...
-3
votes
2answers
317 views

Solving a diophantine equation with three variables

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