Questions tagged [coprime]

Use this tag for questions related to integers such that the only positive integer that divides them is 1.

In number theory, two integers are said to be coprime, relatively prime, or mutually prime if the only positive integer that divides both of them is 1. That is, the only common positive factor of the two numbers is 1. Equivalently, their greatest common divisor is 1.

296 questions
26
votes
6 answers

The Frobenius Coin Problem

I am asked to prove that: For integers $n, x,y > 0$, where $x,y$ are relatively prime, every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. How should I approach this? I have very limited…
John
  • 541
23
votes
2 answers

A regular $n$-gon contains a regular $(n+1)$-gon, with no sides coinciding. What is the maximum number of points of contact between them?

A regular $n$-gon contains a regular $(n+1)$-gon. That is, they are in the same plane, and no part of the regular $(n+1)$-gon is outside of the regular $n$-gon. None of their sides coincide. There are no other restrictions. Among the integers…
Dan
  • 35,053
19
votes
16 answers

If $(a,b)=1$ then prove $(a+b, ab)=1$.

Let $a$ and $b$ be two integers such that $\left(a,b\right) = 1$. Prove that $\left(a+b, ab\right) = 1$. $(a,b)=1$ means $a$ and $b$ have no prime factors in common $ab$ is simply the product of factors of $a$ and factors of $b$. Let's say $k\mid…
Tammy
  • 191
16
votes
3 answers

Is there any similar solutions including $\pi$ like $1-\frac{1}{2}+\frac{1}{4}-\frac{1}{5}+\cdots=\frac{\pi}{3\sqrt{3}}$?

First equation is very popular - there are only odd numbers. Other words, numbers, which are coprime with $2$. $$1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\frac{1}{9}-\frac{1}{7}+\cdots=\frac{\pi}{4}$$ Second is similar, but not very well known. There…
user514787
  • 1,473
14
votes
3 answers

fastest method to determine if two numbers are coprime

I am working on a mathematical problem that involves coprime integers. I wrote a computer program that allows me to search for the numbers I am looking for. However I am looking at a large set of integers and I have to compare many pairs of numbers…
quantus14
  • 2,614
14
votes
3 answers

Generating all coprime pairs within limits

Say I want to generate all coprime pairs ($a,b$) where no $a$ exceeds $A$ and no $b$ exceeds $B$. Is there an efficient way to do this?
13
votes
2 answers

How many numbers in a given range are coprime to $N$?

Is there a good algorithm for counting the numbers $x$ between $A$ and $B$ with $x$ and $N$ coprime? This is just like this question except for the range. The factorization of $N$ is known. I actually need to solve the problem for fixed $N$ and many…
maaartinus
  • 1,401
9
votes
1 answer

Given an integer sequence $a_{n+1}=a_{n}^{2}-a_{n}-1$, prove that $\forall n\in \mathbb{Z}$, $a_{n+1}$ and $2n+1$ are coprime

This is a very interesting infinite integer sequence problem I came across. The crux of the matter lies in comparing the values and the indices - we are supposed to check whether $a_{n+1}$ and $2n+1$ are coprime as opposed to any two members of the…
fayog
  • 247
8
votes
2 answers

Find all $n$ such that $\gcd(3n-4, n^2+1)=1$

I need to find all $n\in\mathbb{Z}$ so that $3n-4$ and $n^2+1$ would be coprime numbers. I was thinking about using Euclidean algorithm - if two numbers $a$ and $b$ are coprime, then exist integers $c$ and $d$: $ac+bd=1$. So if there do not exist…
7
votes
2 answers

Relation between primeness and co-primeness of integers

I wonder what this stunning formal analogy between the definitions of being co-prime (for two integers) and being prime (for one integer) might reveal – and how: $\alpha, \beta$ are co-prime iff $$(\forall x)\ \alpha|x \wedge \beta|x…
7
votes
1 answer

Probability of k random integers being coprimes

In this section of the Wikipedia article on coprime integers, it is stated that: More generally, the probability of $k$ randomly chosen integers being coprime is $1/\zeta(k)$. where $\zeta$ is the Riemann zeta function. Although there is no proof…
7
votes
1 answer

Is there an elegant Stern Brocot like way to generate all coprime triples?

As one might know, the Stern Brocot tree elegantly and compactly models all rational numbers. I am now left wondering if a process like this tree modeling could be done not only for pairs but for triples and even beyond. To be more specific, what…
7
votes
2 answers

Finding a coprime of a general magnitude.

I have an arbitrary number $x$. I would like to compute a number that is coprime to $x$ that's close(ish) to the square root of $x$. I don't need to find them all, and factoring $x$ is expensive. I just need one number. I could also check a few…
Him
  • 483
6
votes
1 answer

Find the smallest natural number $n$ such that every $n$-element subset of $S=\{1,2,\dots,280\}$ contains $5$ pairwise relatively prime numbers

A friend gave me the following question to solve- Let $S=\{1,2,\dots ,280\}$. Find the smallest natural number $n$ such that every $n$-element subset of $S$ contains $5$ pairwise relatively prime numbers. I am pretty sure, the solution has to do…
6
votes
1 answer

What is the probability that 2 integers have a greatest common factor of 2?

If we pick any two positive integers at random, what is the probability that their greatest common factor is 2? I have been wondering about this problem for a while and done some work on it. I started by thinking of a reasonable upper or lower…
user498190
  • 151
  • 7
1
2 3
19 20