brain
tamnd's digital brain — notes, problems, research
43815 notes
**Solution.
Let m=pq be a Blum integer, with
We are asked to consider an abstract computer that can perform the operations $x + y$, $x - y$, $x \cdot y$, and $\lfloor x/y \rfloor$ on integers $x$ and $y$ of arbitrary length in one unit of time,...
The requested solution is a standalone writeup, so I am providing it in a writing block.
Let $N = pq$ where $p \equiv 3 \pmod 8$ and $q \equiv 7 \pmod 8$.
The reviewer’s objections are correct.
We are asked to find a long chain of *successive primes*, where a prime \(q\) is a successor of a prime \(p\) if \[ q = 2^k p + 1 \] for some integer \(k \ge 0\), and both \(p\) and \(q\) are prime.
Let $N = pq$ where $p \equiv 3 \pmod 8$ and $q \equiv 7 \pmod 8$.
Equation (22) has the form T(m)\asymp m+\frac{\ln N}{\ln m}, up to multiplicative factors that vary only slowly with $m$.
Let $N = pq$ be the product of two distinct primes, as in the RSA scheme.
**Statement.
Let $N$ be an odd positive integer with prime factorization N = q_1^{f_1} \cdots q_d^{f_d}, where the $q_i$ are distinct primes and $f_i \ge 1$.
We are asked to use exercise 1.
Suppose RSA uses public exponent $e=3$.
Let S(n)=\{\,p_1^{e_1}p_2^{e_2}\cdots p_m^{e_m}\le n : e_i\ge0\,\}.
Let $Q(A,B)=A^2-dB^2,$ and let $v_p(n)$ denote the exponent of the prime $p$ in $n$, with the convention that $v_p(n)=k \iff p^k\mid n,\quad p^{k+1}\nmid n.$ The quantity to be determined is $f(p,d)=\...
Let N=fr+1,\qquad 0<r\le f+1, and suppose that for every prime divisor $p$ of $f$ there exists an integer $x_p$ such that
Let N=5\cdot 2^n+1, and let
The statement as printed in the exercise contains a typographical problem in the oscillatory term.
Let $S = {n : 1 < n \le N,\ n\ \text{odd},\ n\ \text{composite}}$.
Let $p \ge 0$ be an integer and $q > 1$ an odd integer.
Let $p$ be a prime number, and consider Algorithm B from Section 4.
Let $n\ge 3$ be odd, and let $p_n$ be the probability that Algorithm P declares $n$ to be prime when $n$ is actually composite.
Let $D$ be given and let $p$ be any odd prime such that $p-1 \mid D$.
Let $p_n$ and $p_{n-1}$ denote the two largest prime factors in a typical factorization, ordered so that $p_{n-1} \le p_n$.
Let $D$ be a given positive integer, and let $p$ range over odd primes.
A **Mersenne prime** is a prime number of the form $M_p = 2^p - 1,$ where $p$ itself is prime.
The proof proceeds by structural induction on the Pratt tree.
Let $P$ and $Q$ be integers with $\gcd(P,Q) = 1$, and define the Lucas sequence $(U_n)$ by $U_0 = 0, \quad U_1 = 1, \quad U_{n+1} = P U_n - Q U_{n-1} \quad (n \ge 1).$ Let $N$ be a positive integer su...
We are asked to prove that the number $T$ computed in step E3 of Algorithm E (the strong pseudoprime test in Section 4.
Let N=p_1^{a_1}p_2^{a_2}\cdots p_d^{a_d}, where $p_1,\ldots,p_d$ are the distinct prime factors of $N$.
Let $n>1$ satisfy the hypothesis: for every prime $p \mid (n-1)$ there exists an integer $x_p$ such that x_p^{(n-1)/p} \equiv 1 \pmod n, \qquad x_p^{n-1} \not\equiv 1 \pmod n.
We are asked to determine the outputs of Algorithm E when N = 197209, \quad k = 5, \quad m = 1.
**Exercise 4.
Let $n$ be an odd integer, $n \ge 3$, and suppose that $\lambda(n)$, the Carmichael function of $n$ defined in Theorem 3.
We are asked to count the number of integers $x$ with $0 \le x < p$ such that the congruence x^2 - N \equiv y^2 \pmod p has a solution $y$, where $p$ is an odd prime and $p \nmid N$.
Algorithm D (Fermat's method) involves iterative calculations modulo various integers $m_i$ to test for squares and compute factors of a number $N$.
Let us construct a number $P$ with the desired property.
The review correctly identifies the central failure: the solution never completes Fermat’s method by producing an actual $x$, $y$, and hence never factors $11111$.
**Exercise 4.
Step A2 of Algorithm A tests whether the current value of $n$ is equal to $1$, and if so, terminates the algorithm.
**Corrected Solution to Exercise 4.
Let K=\sum_{n\ge 0}2^{-2^{n}} =\frac12+\frac14+\frac1{16}+\frac1{256}+\cdots .
In Algorithm A the invariant at step A1 states that $n$ has no prime factors less than $d_k$.
Let $h$ be the number of hits and $a$ the number of times at bat.
Let L(n)=\max_{m\ge 0}T(m,n), where $T(m,n)$ is the number of division steps performed by Euclid's algorithm on inputs $u=m$, $v=n$.
Let $a_1, \ldots, a_n$ be positive integers.
Let S(n)=\sum_{1\le m<n}s(m,n), where $s(m,n)$ denotes the sum of the partial quotients in the simple continued fraction of $m/n$.
Let g_k=\gcd(u_1,\ldots,u_k)\qquad (1\le k\le n).
Let $h_0(n)$ be the number of representations of $n$ as in Exercise **33** such that $d < x'$, plus half the number of representations with $2d = x'$.
(a) A Morse code sequence of length $n$ consists of $r$ dots and $s$ dashes with $r + 2s = n$.
Let the modified algorithm be defined as follows.
To produce a fully corrected solution, we must work strictly with the exercise instructions.
Let u=qv+r,\qquad 0\le r<v.
We prove each of the identities in turn.
The statement of the exercise depends on the explicit forms of equations (43), (54), and (55) in Section 4.
We are asked to construct a set \mathcal{I} = I_1 \cup I_2 \cup I_3 \cup \cdots \subseteq [0,1], where the $I_k$ are **pairwise disjoint intervals**, such that identity (45) fails.
Let $n \ge 2$ be an integer, and consider the fractions \frac{k}{n}, \quad 1 \le k \le \lfloor n/2 \rfloor.
Let $X$ be a real number chosen uniformly at random from the interval $[0,1)$.
We are asked to develop efficient methods for approximating the quantities $\lambda_1$ and $\Psi_2(x)$ in equation (44) of [_HM46_], for small $y \ge 3$ and $0 \le x \le 1$.
**Exercise 4.
Let $K_n(x_1,\dots,x_n)$ denote the continuant defined in Section 4.
The issue here is that the "Actual output" is empty, which usually indicates that the code is reading input incorrectly.
Equation (24) is F(x)=\sum_{m\ge1}\left(F\!
**Exercise 4.
By definition (2), \begin{aligned} //x_1,-x_2// &= \frac{1}{x_1+\frac1{-x_2}} = \frac{1}{x_1-\frac1{x_2}}
Let $x = //x_1, x_2, x_3, \ldots//$ be a regular continued fraction in the sense of equation (10).
Let $X = //A_0, A_1, A_2, \ldots//$ be the regular continued fraction of a real number $X$.
Let $X = (\sqrt{D} - U)/V$ be a quadratic irrationality, where $D$, $U$, $V$ are integers, $D > U^2 \ne 0$, $D$ is not a perfect square, and $V$ divides $D - U^2$.
Unusual activity has been detected from your device.
Let X=A_0+//\!
**Exercise 4.
We restart from the structural identity behind regular continued fractions: each partial quotient corresponds to a Möbius transformation, and the continuant formulas encode their matrix products.
Let C(x_1,\ldots,x_n)=//x_1,\ldots,x_n// denote the continued fraction defined recursively by
Let C_n = //x_1,x_2,\ldots,x_n// = \frac{p_n}{q_n} be the $n$-th convergent, where $p_n,q_n$ are continuants.
Let $K_n(x_1, x_2, \ldots, x_n)$ denote the continuant polynomial defined by equation (4) in Section 4.
First consider the infinite continued fraction X=//B_1,B_2,\ldots//, where each $B_n$ is a positive integer.
We are asked to prove equation (8) of Section 4.
Let M_n = \begin{pmatrix} x_1 & 1 & 0 & \cdots & 0 \\ -1 & x_2 & 1 & & \vdots \\
We are asked to compute the product of the 2×2 matrices M_0 \cdot M_1 \cdot M_2 \cdots M_n, where
First we verify that the proposed program is correct.
Let $m$ and $n$ be nonnegative integers.
Let $n$ be a positive integer.
Let M=\max(|u|,|v|) at the moment Algorithm K begins.
Exercise 4.
**Problem.
The previous solution must be discarded.
**Solution.
Exercise 4.
Let $H(a,b)$ denote the number of iterations of Harris's algorithm.
Let $G$ be a continuous function on $[0,1]$ satisfying equations (36) and (37).
**Exercise 4.
We are asked to determine $G_2(x)$, the cumulative distribution function of the ratio r_2 = \frac{\min(u_2,v_2)}{\max(u_2,v_2)} after the second subtract-and-shift cycle of Algorithm B, continuing fro...
Exercise 27 established equation (58), expressing $\psi_n$ in terms of Bernoulli numbers.
Let R=\frac{\min(u,v)}{\max(u,v)}\in[0,1].
The proposed solution correctly identifies the probability requested: the probability that a single subtract-and-shift cycle produces an odd value $w$ in the range $[2^n,2^{n+1})$ while the other argu...
Let \Delta(x)=2G(x)-5G(2x)+2G(4x).
Solution to TAOCP 4.5.2 Exercise 23.
We restart from the correct probabilistic model and explicitly connect the “next time step B6 is encountered” to Brent’s limiting distribution.
Equation (46) in the text gives a relation between the series 1 + \rho_1 t + \rho_2 t^2 + O(t^3) and the exponential factor with a quadratic correction: