Articles of number theory

Find all $n$ for the coins

There is a set of $ n$ coins with distinct integer weights $ w_1, w_2, \ldots , w_n$. It is known that if any coin with weight $ w_k$, where $ 1 \leq k \leq n$, is removed from the set, the remaining coins can be split into two groups of the same weight. (The […]

How to properly set up partial fractions for repeated denominator factors

This question already has an answer here: Derivation of the general forms of partial fractions 7 answers

Number of samples to predict the next number in a pseudorandom number generator

Let: $$R_{n+1} = (mR_n + b) \bmod{a} $$ Assume we know the values of $R_1, R_2, \ldots, R_L $. What is the minimum value of $L$ (if it exists) such that we can determine $R_0, m, b$ and $a$?

What the rest of the division $5^{21}$ by $127$?

What the rest of the division $5^{21}$ by $127$?

No members of a sequence is a perfect square

This question already has an answer here: Prove that none of $\{11, 111, 1111,\dots \}$ is the perfect square of an integer 9 answers

Find the limit of $\sum \frac{1}{log^n(n)}$

Working on convergence and divergence of infinite series, I recently focused my attention on the summation $$\displaystyle\sum\limits_{n=2}^{\infty} \frac{1}{log^n(n)}$$ While proving the convergence of this series is trivial (e.g., using the root test), finding a closed-form expression for the value to which it converges seems to be hard. The summation converges to $ \displaystyle\approx 3.24261$. After […]

Is $n=1073$ a strong pseudoprime to bases $a=260, 813?$

The OEIS Wiki page says that $n=1073\,$ is a strong pseudoprime to bases $a=260, 813.$ I think this is an error. $n=1073$ would be a strong pseudoprime to base $a=260$ if (using the decomposition $n-1=d\cdot 2^s, 1072=67\cdot2^4$) we have $$a^d \equiv 1 \pmod n$$ $$x_r \equiv a^{d\cdot 2^r}\equiv -1 \pmod n \quad \text{for some} […]

Number theoretic proof that $n\mid\phi(a^n-1)$

While ‘playing’ with the multiplicative group of integers mod $n$, I noticed that $n\mid \phi(a^n-1)$. The proof is straightforward: $a \in \left ( \mathbb{Z}/(a^n-1)\mathbb{Z} \right )^\times$ because $a \equiv 0 \pmod{p} \Leftrightarrow a^n-1 \equiv -1 \pmod{p}$ for a prime $p$, and hence $\gcd(a,a^n-1)=1$ $\left | a \right |=n $ because $ a^n = (a^n-1)+1 \equiv […]

Is there a solution of $p^a-q^b = 2$ with $p,q$ primes and $a,b > 1$, except $3^3-5^2$?

Question: Is there a solution of $p^a-q^b = 2$ with $p,q$ prime and $a,b > 1$, except $3^3-5^2$ ? Remark: For $p,q,a,b < 200$, the only solution is $3^3-5^2$. Idem for $\max(p,q)<200000$, $\min(p,q)<200$ and $a,b<20$. This question came after this post: Infiniteness of twin prime powers

Generate a polynomial w/ integer coefficients whose roots are rational values of sine/cosine?

I’m a high school calculus/precalculus teacher, so forgive me if the question is a little basic. One of my (very gifted) students recently came up with a construction yielding a quartic, one of whose roots was sin(80º) — which led me to the startling discovery that this (and, indeed, all rational values of sine/cosine (in […]