Given positive integers $a$, $b$ and $c$, I'd like to ask whether we may adopt some variant of the Euclidean algorithm to calculate $\gcd(c^a+1,c^b+1)$ fast?
I know that $$\gcd(a^b-1,a^c-1)=a^{\gcd(b,c)}-1$$ which can be seen by expanding both terms into geometric series. Is there any such simplification for $$\gcd(a^b+1,a^c+1)=?$$  EDIT: When working with polynomials instead of whole numbers, it is $$gcd(x^n+1,x^m+1)=\begin{cases}a^{\gcd(n,m)}+1 &amp; \nu_2(n) =\nu_2(m)\\1 &amp;\text{else}\end{cases}$$ But this gives only a lower bound for the whole-number case.
Obtain the joint PDF of $\theta_{1} - \theta_{2}$ and $\theta_{1}$ where $\theta_{1}$ and $\theta_{2}$ are i.i.d $\text{Uniform}[0, 2\pi)$ I have 2 i.i.d Uniform random variables $\theta_{1}$ and $\theta_{2}$ on $[0, 2\pi)$. Here the problem pushes us to consider that all operations are made modulo $2\pi$. My question is how to obtain the joint PDF of $\theta_{1} - \theta_{2}$ and $\theta_{1}$ and then obtain the conditional PDF of $\theta_{1}$ given $\theta_{1} - \theta_{2}$??. For the second part It can be deduced from the first by writing it as the joint PDF divided by the PDF of $\theta_{1}$. But for the first part, A common idea that I saw is to derive the $\text{CDF}(x, y) = P(\theta_{1} - \theta_{2} \le x$, $\theta_{1} \le y$) and then perform derivations respect to $x$ and $y$. Is this a right approach? If yes, how to proceed with CDF especially with our uniform distribution restrictions? How to describe arbitrary accelerations in special relativity Subsubsection: remove the newline (like paragraph) Using the article document class, how can one remove the newline at the end of a subsubsection title?  I am using \documentclass{article}; I do not currently use titlesec or any of the alternatives; I do use fancyhdr. If $X_1, ..., X_n$ are independent identically-distributed random variables, what can be said about the distribution of $\min(X_1, ..., X_n)$ in general? A group $G$ with $G'$ abelian and every abelian normal subgroup finite Let $G$ be a group such that  $G'$ abelian  and any abelian normal subgroup of $G$ is  finite. Show that $G$ is finite. How do I temporarily disable an app when there is no "Disable" option Assume  $$\lim_{n\to \infty}  (y_{2n} - y_n)=0$$  then  $$\lim_{n\to \infty} y_n$$  exists.  I know it's not true, and I can see a sequence that disprove that $(1,1,2,1,3,2,4,1,5,3,...)$ but I want a sequence that has formula.  hint/help?  thanks I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding.  For example:  declare @value decimal(18,2)  set @value = 123.456   This will automatically round @value to be 123.46, which is good in most cases.  However, for this project, I don't need that.  Is there a simple way to truncate the decimals I don't need?  I know I can use the left() function and convert back to a decimal.  Are there any other ways? When we find the electric field between the plates of a parallel plate capacitor we assume that the electric field from both plates is $${\bf E}=\frac{\sigma}{2\epsilon_0}\hat{n.}$$ The factor of two in the denominator comes from the fact that there is a surface charge density on both sides of the (very thin) plates. This result can be obtained easily for each plate. Therefore when we put them together the net field between the plates is $${\bf E}=\frac{\sigma}{\epsilon_0}\hat{n}$$ and zero everywhere else. Here, $\sigma$ is the surface charge density on a single side of the plate, or $Q/2A$, since half the charge will be on each side.   But in a real capacitor the plates are conducting, and the surface charge density will change on each plate when the other plate is brought closer to it. That is, in the limit that the two plates get brought closer together, all of the charge of each plate must be on a single side. If we let $d$ denote the distance between the plates, then we must have $$\lim_{d \rightarrow 0}{\bf E}=\frac{2\sigma}{\epsilon_0}\hat{n}$$ which disagrees with the above equation. Where is the mistake in this reasoning?  Or more likely, do our textbook authors commonly assume that we are in this limit, and that this is why the conductor behaves like a perfectly thin charged sheet? eGPU Vega 56 (Blackmagic) Mac + cycles problem Hello I just got the AMD Radeon RX Vega 56 (blackmagic eGPU Pro) yesterday  plugged it in to my brand new Mac mini (Mojave), it shows up in the menubar and as an alternative as a render engine,. My question is, can I use this eGPU for cycles renders? (Blender 2.80)  Very grateful for your responses. Which is correct, "you and I" or "you and me"? When I open the file in Vim, I see strange ^M characters.  Unfortunately, the world's favorite search engine does not do well with special characters in queries, so I'm asking here:   What is this ^M character? How could it have got there? How do I get rid of it? Algorithm to return all combinations of k elements from n I want to write a function that takes an array of letters as an argument and a number of those letters to select.   Say you provide an array of 8 letters and want to select 3 letters from that. Then you should get:  8! / ((8 - 3)! * 3!) = 56   Arrays (or words) in return consisting of 3 letters each. I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default:  TInstanceVariables = class   fBoolean: boolean; // always starts off as false   fInteger: integer; // always starts off as zero   fObject: TObject; // always starts off as nil end;   This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi?  For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines.  Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor?  As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil).  I'm guessing the norm is to always set procedure-level variables before accessing them? . If you filter out a range of wavelengths, how can you calculate the energy from the remaining wavelengths?   To make it concrete, say we filter everything below 450nm or alternatively above 700nm. Using Regular Expressions to Extract a Value in Java I have several strings in the rough form:  [some text] [some number] [some more text]   I want to extract the text in [some number] using the Java Regex classes.  I know roughly what regular expression I want to use (though all suggestions are welcome). What I'm really interested in are the Java calls to take the regex string and use it on the source data to produce the value of [some number].  EDIT: I should add that I'm only interested in a single [some number] (basically, the first instance). The source strings are short and I'm not going to be looking for multiple occurrences of [some number]. Code   find / -name netcdf   Output  find: `/root/.dbus': Permission denied find: `/root/.gconf': Permission denied find: `/root/.gconfd': Permission denied find: `/root/.gnome': Permission denied find: `/root/.gnome2': Permission denied find: `/root/.gnome2_private': Permission denied Prove $0! = 1$ from first principles How to output string completions to stdout? Change Windows 7/8/10 system language - welcome screen, login, etc