# Sandbox for drafts of long, complex posts

This sandbox is intended for saving drafts of long, complex posts, especially posts whose composition takes a long time. It serves to localize to one thread the front-page "bumps" caused by edits to drafts of such posts, so that they may be easily ignored. Also, it helps to guard against losing longly-composed posts due to system crashes.

When you are happy with your draft here, you may simply copy the code and paste it to the desired location.

## Proper Use of the Sandbox

1. Do not post a new answer! We wish all the answers on this page to be owned by the Community user (so that only a non-sentient bot is informed of edits to these answers). Posting a new answer will make you the owner, meaning that you will be notified whenever another user makes an edit to that answer.

The sandbox has been "wiki locked" to prevent the creation of new answers. There are more than enough existing answers for users to edit over, and this will greatly reduce the frequency at which we request that the answers be disassociated from specific users.

2. Do not delete answers! Deleting seems like a reasonable option, but there are no "hard deletions" on Stack Exchange, and users with sufficient privileges will still see your supposedly deleted postings. Deleted answers will be undeleted and cleared for the use of others.

3. Do look for an answer which indicates that it is free and then edit it to your heart's content. If none appears available, take over the one that has been left unchanged the longest (which will appear at the bottom of the page if you order answers by "activity").

4. Do not expect your draft to remain untouched for days. There are no guarantees that your draft will be the latest revision if you return days later. While users will try not to step over others' toes, it may happen that an unfinished draft is edited out. Your draft will, however, still exist as a revision of the answer it was made in. If your drafting is expected to take place over a longer period of time, either

• take note of the URL of the answer provided by clicking the share button, or
• save a copy of your draft locally (or even "in the cloud").
5. Do clear your draft when you are finished. This includes removing all $\LaTeX$ from your answers. Replacing all code with a simple statement like

This answer is free for anyone to use

is sufficient. Periodically users may go through and free up answer slots that have not been edited in, say, over one month. But you can aid in the smooth running of this sandbox by clearing away your drafts when you are finished with them.

6. Do not "claim" multiple answers concurrently. Since this post is closed, the answers are a limited resource. If you really must compose several long, complex posts at the same time, you can still use a single answer, separating the different drafts using Markup: horizontal rules (---) and/or headings (# Header 1 #) are natural choices.

7. Do not create new such sandboxes. The point of having a unique such sandbox is that it minimizes the noise on the front page when the sandbox is edited. If there were multiple sandboxes they will frequently occupy numerous front page slots, pushing other topics off the front page, and increasing noise.

• I have added a [sandbox] tag to allow people ignore it more easily (via software support of ignoring tags), and since it seems that we have two sandboxes now, a tag may seem a bit more in place here. – Asaf Karagila Jul 18 '12 at 8:35
• (+1) For thinking outside the (sand)box. – cardinal Jul 18 '12 at 19:40
• At the suggestion of the moderators, I have gone and changed the associated owners of all the answers here to the Community user. This way, the original owners will not receive excess pings for each time another user uses the draft space for their work. Enjoy! – Grace Note Oct 5 '12 at 14:45
• To prevent crashes I've found the "Bookmarks to disable/enable MathJax", provided in here, pretty useful. – leo Dec 17 '12 at 18:03
• PSA: Between the creation of this sandbox (in July 2012) and today (December 2015), technology has advanced. Something like StackEdit (or others, it's simply the only one I know) essentially solves all the limitations of this sandbox. You can have multiple concurrent drafts, you don't have to worry about polluting meta's front page, you can leave your draft untouched for days and expect it to still be there, you don't have to explicitly clear up your draft when you're done... Maybe someday we can get rid of this outdated crutch. – Najib Idrissi Dec 2 '15 at 14:07

$$\def\AA{\mathbb{A}}$$ $$\newcommand\BB{\mathbb{B}}$$

$$\AA$$ and $$\BB$$ both work.

This space is free for anyone to use.

Existence of a one-step-cycle: $$2^{S_2} 3^{S_3} = \left(5+ \frac1{a_1} \right) \text{ in } [5,6] \\ \implies (S_2,S_3)=(1,1) \implies a_1=1$$ Existence of a two-step-cycle: $$2^{S_2} 3^{S_3} = \left(5+ \frac1{a_1} \right) \left(5+ \frac1{a_2} \right)\\ \implies \text{ lhs in } [25,36] \implies \text { solutions for lhs } \in \{27,32,36 \} \\ \to (a) \qquad 2 = 5(\frac1{a_1}+\frac1{a_2})+ \frac1 {a_1a_2} \\ 4a_m^2 - 20a_m +25 = + 27\\ a_m = (\sqrt{27}+5)/2$$ Existence of a three-step-cycle: $$2^{S_2} 3^{S_3} = \left(5+ \frac1{a_1} \right) \left(5+ \frac1{a_2} \right) \left(5+ \frac1{a_3} \right) \\ \text{ rhs in } (125,216) \\ \text{ lhs } \in \{128,144,162,192,216 \} \\$$

$$2^{S_2} 3^{S_3} = \left(5+ \frac1{a_1} \right) \left(5+ \frac1{a_1} \right) \cdots \left(5+ \frac1{a_N} \right)$$

I do not know about a 4 step cycle

Happy new year! Here's a late answer.

It will be shown that, when $$h(v)=\exp\left(-\alpha\psi\left(\frac14+\frac{iv}{2}\right)\right)$$,

$$\widehat{h}(x)=(2\alpha)^{1/4}\sqrt{\pi}e^{\alpha\gamma}\cdot\frac{e^{-x/2+2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)$$ where $$\gamma$$ is the Euler-Mascheroni constant.

On the other hand, it is trivial that when $$h(v)=\exp\left(-\alpha\psi\left(\frac14-\frac{iv}{2}\right)\right)$$, $$\widehat{h}(x)=0$$ for $$x>0$$.

By the substitution $$u=\frac14+\frac{iv}{2}$$,

\begin{align} \widehat{h}(x) &:=\int_{\mathbb R}\exp\left(-\alpha\psi\left(\frac14+\frac{iv}{2}\right)\right)e^{ixv}dv \\ &=-2ie^{-x/2}\int_{\frac14+i\mathbb R}\underbrace{e^{-\alpha\psi(u)}e^{2xu}}_{:=f(u)}du \\ H(x)&:=\frac i2e^{x/2}\cdot\widehat{h}(x)=\int_{\frac14+i\mathbb R}e^{-\alpha\psi(u)}e^{2xu}du \\ \end{align}

By residue theorem and considering the exponential decay of $$f(z)$$, it can be shown that $$H(x)-\int_{-\frac12+i\mathbb R}f(u)du=2\pi i\operatorname*{Res}_{z=0}f(z)$$ $$H(x)=2\pi i\operatorname*{Res}_{z=0}f(z)+\underbrace{\int_{-\frac12+i\mathbb R}f(u)du}_{:=J_0}$$

Lemma 1: $$J_0=O(e^{-x})$$.

Proof:

\begin{align} \left|\int_{-\frac12+i\mathbb R}f(u)du\right| &=\left|\int_{\mathbb R}e^{-\alpha\psi(-1/2+iu)}e^{-x+2xiu}du\right| \\ &\le\int_{\mathbb R}\left|e^{-\alpha\psi(-1/2+iu)}e^{-x+2xiu}\right|du \\ &=e^{-x}\int_{\mathbb R}\left|e^{-\alpha\psi(-1/2+iu)}\right|du \\ &=e^{-x}\int_{\mathbb R}\left|e^{-\alpha\psi(3/2-iu)-\alpha\pi i\tanh(\pi u)}\right|du \quad (1)\\ &=e^{-x}\int_{\mathbb R}\left|e^{-\alpha\psi(3/2-iu)}\right|du \\ &=Ce^{-x} \qquad (2) \end{align}

$$(1)$$: By the reflection formula $$\psi(1-x)-\psi(x)=\pi\cot(\pi x)$$.

$$(2)$$: The last integral can be considered as a constant $$C$$ because it converges (as $$e^{-\alpha\psi(3/2-iu)}\approx u^{-\alpha}$$ for large $$|u|$$ and $$\alpha>1$$) and is independent of $$x$$.

Now, let's focus on the residue at $$0$$. Trivially, $$2\pi i\operatorname*{Res}_{z=0}f(z)=\oint_{|z|=R}f(z)dz \qquad R<1$$

The trick here is to take $$R=\sqrt{\frac{\alpha}{2x}}$$ (I will explain how to come up with this choice of contour on request).

Define $$\phi(z)=\psi(z)+\frac1z+\gamma$$. We have $$\phi(z)=O(|z|)$$ as $$z\to 0$$.

\begin{align} 2\pi i\operatorname*{Res}_{z=0}f(z) &=\oint_{|z|=R}f(z)dz \\ &=\oint_{|z|=R}\exp\left(-\alpha\left(-\frac1z-\gamma+\phi(z)\right)+2xz\right)dz \\ &=e^{\alpha\gamma}\oint_{|z|=R}\exp\left(\frac{\alpha}{z}+2xz\right)\left(e^{-\alpha\phi(z)}-1+1\right)dz \\ &=e^{\alpha\gamma}\underbrace{\oint_{|z|=R}\exp\left(\frac{\alpha}{z}+2xz\right)dz}_{:=J_1} \\ &+e^{\alpha\gamma}\underbrace{\oint_{|z|=R}\exp\left(\frac{\alpha}{z}+2xz\right)\left(e^{-\alpha\phi(z)}-1\right)dz}_{:=J_2} \\ \end{align}

Lemma 2: $$J_1=i\cdot\frac{\alpha^{1/4}\sqrt{\pi}}{2^{3/4}}\cdot\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)$$

\begin{align} J_1 &=\int^\pi_{-\pi}\exp\left(\frac{\alpha}{R}e^{-i\theta}+2xRe^{i\theta}\right)iRe^{i\theta}d\theta \\ &=i\sqrt{\frac{\alpha}{2x}}\int^\pi_{-\pi}\exp\left(\alpha\sqrt{\frac{2x}{\alpha}}e^{-i\theta}+2x\sqrt{\frac{\alpha}{2x}}e^{i\theta}\right)e^{i\theta}d\theta \\ &=i\sqrt{\frac{\alpha}{2x}}\int^\pi_{-\pi}\exp\left(2\sqrt{2\alpha x}\cos\theta\right)e^{i\theta}d\theta \\ &=2i\sqrt{\frac{\alpha}{2x}}\int^\pi_{0}\cos\theta \, e^{2\sqrt{2\alpha x}\cos\theta} d\theta \qquad (1)\\ &=2i\sqrt{\frac{\alpha}{2x}}\cdot\pi I_1\left(2\sqrt{2\alpha x}\right) \qquad (2)\\ &=2\pi i\sqrt{\frac{\alpha}{2x}}\cdot \frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{\sqrt{2\pi}\sqrt{2\sqrt{2\alpha x}}}\left(1+O\left(\frac1{\sqrt x}\right)\right) \qquad (3) \\ &=i\cdot\frac{\alpha^{1/4}\sqrt{\pi}}{2^{3/4}}\cdot\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right) \\ \end{align}

$$(1)$$: The imaginary part cancels out due to oddness, and the extra factor of $$2$$ is due to the evenness of the real part.

$$(2)$$: $$I_1$$ is the first order modified Bessel function of the first kind.

$$(3)$$: Due to the well-known asymptotic expansion $$I_1(z)=\frac{e^z}{\sqrt{2\pi z}}\left(1+O\left(\frac1z\right)\right)$$ for $$z\to\infty$$.

Lemma 3: $$J_2=O\left(\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{5/4}}\right)$$

Proof:

\begin{align} |J_2| &=\left|\oint_{|z|=R}\exp\left(\frac{\alpha}{z}+2xz\right)\left(e^{-\alpha\phi(z)}-1\right)dz\right| \\ &=\left|\int^\pi_{-\pi}e^{2\sqrt{2\alpha}\sqrt{x}\cos\theta}\left(\exp\left(-\alpha\phi(Re^{i\theta})\right)-1\right)iRe^{i\theta}d\theta\right| \\ &\le R\int^\pi_{-\pi}e^{2\sqrt{2\alpha}\sqrt{x}\cos\theta}\left|\exp\left(-\alpha\phi(Re^{i\theta})\right)-1\right|d\theta \\ &\le R\int^\pi_{-\pi}e^{2\sqrt{2\alpha}\sqrt{x}\cos\theta}C|Re^{i\theta}|d\theta \qquad (1)\\ &=CR^2\int^\pi_{-\pi}e^{2\sqrt{2\alpha}\sqrt{x}\cos\theta}d\theta \\ &=CR^2\cdot 2\pi I_0(2\sqrt{2\alpha}\sqrt{x}) \\ &=C\cdot\frac{\alpha}{2x}\cdot 2\pi \cdot \frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{\sqrt{2\pi}\sqrt{2\sqrt{2\alpha x}}}\left(1+O\left(\frac1{\sqrt x}\right)\right) \qquad (2)\\ &=O\left(\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{5/4}}\right) \end{align}

$$(1)$$: As $$\phi(z)=O(|z|)$$, $$\exp\left(-\alpha\phi(z)\right)-1=\exp(O(|z|))-1=1+O(|z|)-1=O(|z|)$$.

$$(2)$$: Due to the well-known asymptotic expansion $$I_0(z)=\frac{e^z}{\sqrt{2\pi z}}\left(1+O\left(\frac1z\right)\right)$$ for $$z\to\infty$$.

Therefore, $$2\pi i\operatorname*{Res}_{z=0}f(z)=i\cdot\frac{\alpha^{1/4}\sqrt{\pi}e^{\alpha\gamma}}{2^{3/4}}\cdot\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)+O\left(\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{5/4}}\right)$$ $$\implies 2\pi i\operatorname*{Res}_{z=0}f(z)=i\cdot\frac{\alpha^{1/4}\sqrt{\pi}e^{\alpha\gamma}}{2^{3/4}}\cdot\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)$$

In conclusion, $$H(x)=i\cdot\frac{\alpha^{1/4}\sqrt{\pi}e^{\alpha\gamma}}{2^{3/4}}\cdot\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)+O(e^{-x})$$

$$\implies H(x)=i\cdot\frac{\alpha^{1/4}\sqrt{\pi}e^{\alpha\gamma}}{2^{3/4}}\cdot\frac{e^{2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)$$

As we defined $$H(x)=\frac i2e^{x/2}\cdot\widehat{h}(x)$$, it can be concluded, eventually, $$\widehat{h}(x)=(2\alpha)^{1/4}\sqrt{\pi}e^{\alpha\gamma}\cdot\frac{e^{-x/2+2\sqrt{2\alpha}\sqrt{x}}}{x^{3/4}}\left(1+O\left(\frac1{\sqrt x}\right)\right)$$

Trajectories on $$\mathbb N$$ induced by $$f(x) = 2x^2 - 1$$:

$$0\to -1 \to +1 \circlearrowleft$$

$$2\to 7 \to 97 \to 18817 \to \ldots$$

$$3\to 17 \to 577 \to 665877 \to \ldots$$

$$4\to 31 \to 1921 \to 7380481 \to \ldots$$

$$5\to 49 \to 4801 \to 46099201 \to \ldots$$

$$6\to 71 \to 10081 \to 203253121 \to \ldots$$

$$8\to 127 \to 32257 \to 2081028097 \to \ldots$$

$$9\to 161 \to 51841 \to 5374978561 \to \ldots$$

Table of prime factors by residue mod $$\mathbf{ 2^n}$$
Prime entries shown in bold

$$x$$ $$f(x)$$ $$f^{(2)}(x)$$ $$f^{(3)}(x)$$
$$2$$ $$\mathbf{7:[-1]2^3}$$ $$\mathbf{97:[+1]2^4}$$ $$18817:2\times[-1]2^5$$
$$x$$ $$2$$ $$3$$ $$4$$ $$5$$ $$6$$ $$8$$ $$9$$
$$f(x)$$ $$\mathbf{7:}\\ [-1]2^3$$ $$\mathbf{17:}\\ [+1]2^4$$ $$\mathbf{31:}\\ [-1]2^5$$ $$49:\\ [-1]^2 2^3$$ $$\mathbf{71:}\\ [-1]2^3$$ $$\mathbf{127:}\\ [-1]2^7$$ $$161:\\ [-1]^2 2^3$$
$$f^{(2)}(x)$$ $$\mathbf{97:}\\ [+1]2^5$$ $$\mathbf{577:}\\ [+1]2^6$$ $$1921:\\ [+1]2^4$$ $$\mathbf{4801:}\\ [+1]2^6$$ $$10081:\\ [+1]2^4$$ $$\mathbf{32257:}\\ [+1]2^9$$ $$51841:\\ [-1]^2 2^4$$
$$f^{(3)}(x)$$ $$C5:\\ [-1]^2 2^5$$ $$\mathbf{665857:}\\ [+1]2^8$$ $$\mathbf{7380481:}\\ [+1]2^9$$ $$C8:\\ [-1]^2 2^5$$ $$C9:\\ [+1][-1]^2 2^5$$ $$C10:\\ [+1]^2 2^6$$ $$C10:\\ [+1][-1]^2 2^5$$

Question title: Can first order logic be extended to include infinite conjunctions?

Can first order logic (FOL) be extended in some way where infinite conjunctions are permissible? Specifically, can it be extended and still refute statements in a finite number of steps?

I would like this question to be answered using Tarskian semantics, where names refer to objects external to the logic.

Suppose that an infinite conjunction is legal syntax in a first order theory. In first order logic, we are free to negate any formula we can reason about, so a theory which can reason about infinite disjunctions will necessarily reason about their negation.

$$$$\tag{1} \{P_a,P_b,\dots\}$$$$

$$$$\tag{2} \lnot(P_a\lor P_b\lor\dots)$$$$

Consider a first order theory which contains the infinite set of formulae $$(1)$$ and the negation of an infinite disjunction $$(2)$$. Any interpretation which satisfies $$(2)$$ will necessarily make the set of formulae $$(1)$$ unsatisfiable. However, every finite subset of formulae will be satisfiable, which by compactness means that the whole thing is.

This is a contradiction, so it must not be the case that an infinite conjunction can be made legal syntax in a first order theory.

Question title: What did Hilary Putnam mean by this following quote of his?

In Putnam's paper "The logic of quantum mechanics", he states:

There is nothing really answering to the Copenhagen idea that two kinds of description (classical and quantum mechanical) must always be used for the description of physical reality (one kind for the ways to be used for the 'observer' and the other for the 'system'), nor to the idea that measurement changes what is measured in a indescribable way (or even brings into existence), nor to the 'quantum potential', 'pilot waves', ect. of the hidden variable theorists. These no more than Reichenbach's 'universal forces'.

Precisely what did he mean by this? In particular, what did he mean by the "idea that measurement changes what is measured in a indescribable way (or even brings into existence)"? How does one clearly define the the issue raised in the first point, and has it been resolved today?

Question title: Has it become too hard to write self answer questions?

Recently I posted a self answer question which I had been working on in the Sandbox for drafts of long, complex posts for $$2$$ months (August $$10^{th}$$ to October $$10^{th}$$), which underwent $$44$$ revisions before it was posted. I also vetted the answer in the logic room to make sure it was correct before posting.

Despite the effort involved the question still got closed, and received $$4$$ downvotes within a short timeframe.

I was able to get the question reopened by addressing the critical feedback in the comments. The process of learning new content to edit the question, asking for it to be reopened, and now this meta post has taken a lot of time. I also went to constructive feedback to ask for possible explanations regarding the downvotes, since no comments were left.

Should self answer questions really require this much involvement? I learnt a lot from writing this question and from the feedback I got, but the closure and downvotes were rather unwelcome and time consuming.

This space is free for anyone to use.

"This space is free for anyone"

This space is now free for anyone to use

(4) Now let us look for which (odd!) $$n$$ the expression $$f(n)$$ contains small primefactors.

• Assume $$p=3, \lambda=2$$, find $$n$$ :
Remember: \begin{align} \{f(n),p\} &= (\{2n : \lambda\} &-\{n : \lambda\})&\cdot (1 + \{n,p\})&-\{n,p\} \\ \end{align} For every odd $$n$$ the leading parenthese must evaluate to $$1$$, so $$2n$$ must be divisible by $$\lambda=2$$ but not $$n$$, so simply $$n$$ must be odd: \begin{align} n \text{ odd:}\\ \{f(n),3\}&= (\{2 \cdot n : 2\} &-\{n : 2\})&(1 + \{n,3\})&-\{n,3\} \\ &= (1&-0)&(1 + \{n,3\})&-\{n,3\} \\ &= &&1 + \{n,3\}&-\{n,3\} \\ &= 1 \end{align} and the smallest $$n$$ is simply $$n=1$$. The next $$n$$ are from $$(1,3,5,7,9,...)$$ and always $$\{f(n),3\}=1$$ which is the same as $$f(n) = 3 \cdot x$$ where $$x$$ does not contain the primefactor $$3$$.

• Assume $$p=5$$, $$\lambda=4$$ The first parenthese $$(\{2 \cdot n : 4\} -\{n : 4\})$$evaluates to $$1$$ when $$\{n,2\}=1$$, so for $$n \in \{2,6,10,... \}$$ we have $$\{ f(n),5\} = 1$$ and for odd $$n$$ we have $$\{f(n),5\}=-\{n,5\}$$. We already know, that $$n$$ must be odd, so we will never have $$5$$ as primefactor in the result.

• Assume $$p=7$$, $$\lambda=3$$ The first parenthese $$(\{2 \cdot n : 3\} -\{n : 3\})$$ evaluates always to $$0$$ so we have always $$\{f(n),7\}=-\{n,7\}$$ and we will never have $$7$$ as primefactor in the result.

• Assume $$p=11, \lambda=10=2\cdot 5$$
For the leading parenthese to equal $$1$$, $$2n$$ must be divisible by $$\lambda=10$$ but not $$n$$, so simply $$n$$ must be divisible by $$5$$ and be odd. \begin{align} \text{for } n = 5+ k \cdot 10 : \\ \{f(n),3\}&= (\{2 \cdot n : 2\} &-\{n : 2\})&(1 + \{n,3\})&-\{n,3\} \\ &= (1&-0)&(1 + \{n,3\})&-\{n,3\} \\ &= &&1 + \{n,3\}&-\{n,3\} \\ &= 1 \end{align} and the smallest $$n$$ is simply $$n=5$$.

I've had myself difficulties to decode the WP-entry on Ramanujan-summation, but with some additional explanations and intermediate steps made explicite I think it becomes clearer. Note, that G.H.Hardy already mentioned that the set of definitions by Ramanujan does not make his solution unambiguous and that at least after that remark slightly different versions are underway - but I don't want to take this into the scope of this short edit.

WP starts with a version of the Euler-MacLaurin formula: $$\begin{array} {} \frac12 f(0)&+f(1)+f(2)+...+f(n-1)+\frac12f(n)\\ &=\frac12[f(0)+f(n) ] + \displaystyle \sum_{k=1}^{n-1} f(k) \\ & \displaystyle =\int_{t=0}^{n} f(t) d t + \sum_{k=1}^p { B_{k+1} \over (k+1)!}[f^{(k)}(n)-f^{(k)}(0)] + R_p \end{array}\tag {1a}$$ I do not know from why the term $$\frac12[f(0)+f(n) ]$$ has been introduced here, but noticing that we have $$n$$ as well as $$n-1$$ in the upper bound of the sum-indices I find it easier to adapt this first to write $$\begin{array} {} \frac12[f(0)-f(n) ] + \displaystyle \sum_{k=1}^{n} f(k) & \displaystyle =\int_{t=0}^{n} f(t) d t + \sum_{k=1}^p { B_{k+1} \over (k+1)!}[f^{(k)}(n)-f^{(k)}(0)] + R_p \end{array}$$ and take that expression to the right side $$\begin{array} {} \displaystyle \sum_{k=1}^{n} f(k) & \displaystyle =\int_{t=0}^{n} f(t) d t + \frac12[f(n)-f(0) ] + \sum_{k=1}^p { B_{k+1} \over (k+1)!}[f^{(k)}(n)-f^{(k)}(0)] + R_p \end{array}$$ and subsume it to the sum-of-Bernoullinumbers, assuming $$B_1=-\frac12$$: $$\begin{array} {} \displaystyle \sum_{k=1}^{n} f(k) & \displaystyle =\int_{t=0}^{n} f(t) d t + \sum_{k=0}^p { B_{k+1} \over (k+1)!}[f^{(k)}(n)-f^{(k)}(0)] + R_p \end{array} \tag {1b}$$ In the following derivations it is always assumed, that in the limit $$p \to \infty$$ we can ignore $$R_p$$ (or: that we apply this all only at functions, where this is meaningful!), and a small reorganisation of the factorials in the denominators in the rhs-sum expression makes the "basic notation"
$$\sum_{k=1}^{n} f(k) =\int_{t=0}^{n} f(t) d t + \sum_{k=0}^\infty { B_{k+1} \over k+1}{f^{(k)}(n)-f^{(k)}(0)\over k! } \tag 2$$

We see in (2) that the sum has a constant expression, namely the derivatives of the $$f(0)$$ . We might separate this $$\sum_{k=1}^{n} f(k) =\int_{t=0}^{n} f(t) d t + \sum_{k=0}^\infty { B_{k+1} \over k+1}{f^{(k)}(n)\over k! } - \sum_{k=0}^\infty { B_{k+1} \over k+1}{f^{(k)}(0)\over k! } \tag {3a}$$
and Ramanujan took this out and called that constant part $$C$$ with definition $$C=- \sum_{k=0}^\infty { B_{k+1} \over k+1}{f^{(k)}(0)\over k!}$$ so that we find often the notation $$\sum_{k=1}^{n} f(k) = C + \int_{t=0}^{n} f(t) d t + \sum_{k=0}^\infty { B_{k+1} \over k+1}{f^{(k)}(n)\over k! } \tag {3b}$$

and also called this a "center of gravitation of the series". The key is here, that he takes this value as finite value representation for the divergent series, computable by the rearranged equation: $$C = \sum_{k=1}^{n} f(k) - \int_{t=0}^{n} f(t) d t - \sum_{k=0}^\infty { B_{k+1} \over k+1}{f^{(k)}(n)\over k! } \tag {4}$$

question:see MSE $$\begin{array} {} 2^{a}-3^{b}&=C & \text{assume we have a current solution}\\ 2^{a+a_1}-3^{b+b_1}&=C & \text{assume we have a second solution}\\ 2^{a+a_1}-2^a &= 3^{b+b_1}-3^b & \text{subtract }\\ {2^{a_1}-1 \over 3^b} &= {3^{b_1} -1\over 2^a} &\text{must be existent with } a_1,b_1 \gt 0 \end{array}$$ Then by divisibility conditions, $$a_1=2.3^{b-1}.a_2$$, $$b_1=2^{a-1}.b_2$$ $$\begin{array} {} {2^{2.3^{b-1}.a_2}-1 \over 3^b} &= {3^{2^{a-1}.b_2} -1\over 2^a} \end{array}$$ For the following analysis using primefactorization of the lhs and rhs we write now $$\begin{array} {} lhs:& {2^{2.3^{b-1}.a_2}-1 \over 3^b} &= p_1^{e_1}\cdot x_1 \\ rhs:& {3^{2^{a-1}.b_2} -1\over 2^a} &=p_1^{e_1}\cdot y_1 \end{array}$$ Because lhs and rhs shall be equal, of course $$x_1$$ and $$y_1$$ must as well be equal. But we proceed by assuming one $$b$$ and $$a_2$$ then look at the smallest primefactor $$p_1$$ in the lhs, and configure $$a$$ in the rhs, such that $$p_1^{e_1}$$ occurs in the rhs as well.
Example. Let's choose $$C=5$$. A known solution is $$2^5-3^3=5$$ such that $$a=5$$ and $$b=3$$. Then, assuming for $$a_2=1$$ the smallest nonzero value we have $$\begin{array} {} lhs:& {2^{2.3^2.a_2}-1 \over 3^3} &= p_1^{e_1}\cdot x_1 &= 7.19.73\\ rhs:& {3^{2^4.b_2} -1\over 2^5} &=p_1^{e_1}\cdot y_1 \end{array}$$

This slot is available for anyone to use

This box is free for everyone to use

(3) The more involved problem of $$f(n) = {2^n+1 \over n}$$ being integer gives even more restrictions. We have

• $$n$$ must be odd, because otherwise the denominator would not divide the numerator
• since $$n$$ is odd, $$\lambda(p)$$ must be even with exactly one primefactor $$2$$ : $$\lambda(p) = 2 x$$ where $$x$$ is odd. This defines a restriction on allowable primes: $$\small (p,\lambda(p))=(3,2),(11,10),(13,6),(19,18),\cdots$$ are allowed but not $$\small (5,4),(17,4),\cdots$$

We have moreover that -if the expression $$f(n)$$ is integer- it is also squarefree because: $$\left\{{2^n+1 \over n},p\right\}= (1+ \{n,p\})-\{n,p\}=1$$

$$\qquad \qquad$$ as far as is does not contain Wieferich primes.

(2) Now for the question on $$2^n+1$$ we refer to that $$2^n+1=(2^{2n}-1)/(2^n-1)$$ and since we look only at odd and non-wieferich primes $$p$$ we can write $$\alpha=1$$: \small \begin{align} \{2^n+1,p\} &=\{2^{2n}-1,p\} - \{2^{n}-1,p\} \\ &= \{2n : \lambda\}\left(1+ \{2n,p\}\right) - \{n : \lambda\}\left(1+ \{n,p\}\right) \qquad \text{ can be simplified } \\ &= \left(\{2n : \lambda\}-\{n : \lambda\}\right) \left(1+ \{n,p\}\right)\\ \end{align} This gives three little observations:

• primes p with odd $$\lambda$$ cannot occur in $$2^n+1$$ : we have then $$\left(\{2n : \lambda\}-\{n : \lambda\}\right)=0$$ because if odd $$\lambda$$ divides $$2n$$ then it also divides $$n$$ and the parenthese evaluates to zero.The same result of course if odd $$\lambda$$ does not divide $$2n$$ .

• if $$n$$ is odd, then $$\lambda=2 c$$ for some odd $$c$$ and having $$p=1+k \lambda$$

• if $$n$$ is even, say $$n=2^a c$$ then $$\lambda=2^{a+1} d$$ for some odd $$c,d$$

For a prime $$p$$ which actually occurs in $$2^n+1$$ its exponent in the primefactorization is exactly $$1+ \{n,p\}$$.

(1) First notice that $$2^n+1 = {2^{2n}-1\over 2^n-1 }$$ Then for divisibility of $$2^n-1$$ by a primefactor $$p$$ there are nice little rules due to Fermat's little theorem, Euler's totient rules, and the so-called LTE ("Lifting the exponent")-rules. In an essay where I looked at this I preferred the following notations for better writing: $$\begin{array} {}\text{divisibility: } \qquad &\{a : p \} = \begin{cases} 1 & \text{ if } p \mid a \\ 0 & \text{ if } p \not \mid a \end{cases} \\ \text{valuation: } & \{a , p \} = \nu_p(a) \\ \text{order: } & \lambda_2(p) \underset{def}= \text{minimal } m>0 \text{ such that } \{2^m-1 : p \}=1 \\ \text{offset (of expon.):} & \alpha_2(p) \underset{def}= \{2^{\lambda_2(p)}-1,p\} \ge 1 \end{array}$$ For better readability, if the index and the argument of $$\lambda_2(p)$$ and $$\alpha_2(p)$$ are clear by the formula where they occur, I'll omit their reference for instance in $$\alpha = \{2^\lambda-1,p\}$$

Then, for the exponent of a prime $$p$$ in $$2^n-1$$ we have the general rule $$\{2^n-1, p\} = \{n : \lambda\}\left(\alpha+ \{n,p\}\right) \qquad \text {with } \alpha \ge 1 \tag 1$$ Note, that for base $$2$$ in $$2^n-1$$ all $$\alpha_2(p)$$ are $$1$$ with up to today two known exceptions $$p=1093$$ and $$p=3511$$ ("Wieferich primes") where $$\alpha_2(p)=2$$. It is an open problem whether there exist more Wieferich-primes and what $$\alpha$$ they have.
Examples:

\begin{align} \{2^n-1,3\} &= \{n:2\}\left( 1+ \{n,3\} \right)&(\lambda,\alpha)=(2,1)\\ \{2^n-1,5\} &= \{n:4\}\left( 1+ \{n,5\} \right) &(\lambda,\alpha)=(4,1)\\ \{2^n-1,7\} &= \{n:3\}\left( 1+ \{n,7\} \right) & (\lambda,\alpha)=(3,1)\\ \{2^n-1,19\} &= \{n:18\}\left( 1+ \{n,19\} \right) & (\lambda,\alpha)=(18,1)\\ \vdots & \text{ the two known exceptional} & \text{ Wiefer.primes} \\ \{2^n-1,1093\} &= \{n:364\}\left( 2+ \{n,1093\} \right) & (\lambda,\alpha)=(364,2)\\ \{2^n-1,3511\} &= \{n:1755\}\left( 2+ \{n,3511\} \right) & (\lambda,\alpha)=(1755,2)\\ \vdots \end{align}

$$\{2^n+1,p\} = \{2^{2n}-1,p\}-\{2^n-1,p\}$$ $$\begin{array}{} \{2^n-1,3\} &= \{ n :2 \}(1+\{n,3\}) \\ \{2^n+1,3\} &= \{ 2n :2 \}(1+\{2n,3\})-\{ n :2 \}(1+\{n,3\})\\ &= (1-\{n :2 \}) (1+\{n,3\}) \end{array}$$ $$\begin{array}{} \{2^n-1,19\} &= \{ n :18 \}(1+\{n,19\}) \\ \{2^n+1,19\} &= \{ n :9 \}(1+\{n,19\})-\{ n :18 \}(1+\{n,19\})\\ &= \{n:9\}(1-\{n :2 \}) (1+\{n,19\}) \end{array}$$

Test newly available syntax using data from this question.

$$n$$ approximation solution
$$1$$ $$2.84071 +1.69496 \,i$$ $$2.84550 +1.68429 \,i$$
$$2$$ $$3.34357 +1.44741 \,i$$ $$3.35044 +1.43963 \,i$$
$$3$$ $$3.64315 +1.33808 \,i$$ $$3.65025 +1.33195 \,i$$
$$4$$ $$3.85317 +1.27397 \,i$$ $$3.86019 +1.26882 \,i$$
$$5$$ $$4.01366 +1.23065 \,i$$ $$4.02051 +1.22614 \,i$$
$$6$$ $$4.14297 +1.19882 \,i$$ $$4.14966 +1.19475 \,i$$
$$7$$ $$4.25095 +1.17409 \,i$$ $$4.25749 +1.17037 \,i$$
$$8$$ $$4.34346 +1.15414 \,i$$ $$4.34987 +1.15068 \,i$$
$$9$$ $$4.42428 +1.13756 \,i$$ $$4.43056 +1.13432 \,i$$
$$10$$ $$4.49595 +1.12348 \,i$$ $$4.50212 +1.12041 \,i$$
$$20$$ $$4.95332 +1.04533 \,i$$ $$4.95880 +1.04314 \,i$$
$$30$$ $$5.21027 +1.00868 \,i$$ $$5.21539 +1.00685 \,i$$
$$40$$ $$5.38829 +0.98573 \,i$$ $$5.39318 +0.98411 \,i$$
$$50$$ $$5.52410 +0.96940 \,i$$ $$5.52881 +0.96791 \,i$$
$$60$$ $$5.63366 +0.95690 \,i$$ $$5.63824 +0.95551 \,i$$
$$70$$ $$5.72535 +0.94687 \,i$$ $$5.72982 +0.94556 \,i$$
$$80$$ $$5.80411 +0.93855 \,i$$ $$5.80849 +0.93730 \,i$$
$$90$$ $$5.87307 +0.93147 \,i$$ $$5.87738 +0.93027 \,i$$
$$100$$ $$5.93438 +0.92534 \,i$$ $$5.93862 +0.92418 \,i$$
$$200$$ $$6.32917 +0.88910 \,i$$ $$6.33302 +0.88818 \,i$$
$$300$$ $$6.55383 +0.87067 \,i$$ $$6.55748 +0.86985 \,i$$
$$400$$ $$6.71067 +0.85862 \,i$$ $$6.71420 +0.85787 \,i$$
$$500$$ $$6.83097 +0.84980 \,i$$ $$6.83439 +0.84908 \,i$$
$$600$$ $$6.92840 +0.84289 \,i$$ $$6.93176 +0.84222 \,i$$
$$700$$ $$7.01021 +0.83726 \,i$$ $$7.01351 +0.83661 \,i$$
$$800$$ $$7.08066 +0.83252 \,i$$ $$7.08391 +0.83189 \,i$$
$$900$$ $$7.14249 +0.82845 \,i$$ $$7.14570 +0.827838 \,i$$
$$1000$$ $$7.19756 +0.82489 \,i$$ $$7.20073 +0.824289 \,i$$

3) This makes a search-routine meaningful. We take $$a_0=25$$ as initial value. We begin with $$\rho=1$$ and test $$U(a_0;R)\overset?=1$$ with $$R=[0]$$,$$R=[1]$$,$$R=[2]$$. We get no solutions.
$$\rho=2$$ and test with $$R=R_{2,j}=[[0,0],[0,1],[0,2],[1,0],[1,1],...[2,1],[2,2]]_j$$ . Again, no solutions. Next:

$$\rho=3$$ and test with $$R=R_{3,j}=[[0,0,0],[0,0,1],...[2,2,1],[2,2,2]]_j$$ . Again, no solutions.
And so on. With $$\rho=4$$ we get solution(s) and can proceed to arbitrary $$\rho$$.

Time consumption is exponentially growing, so up to $$\rho=10$$ is easy for modern computer (say, $$2$$ secs) but up to $$\rho=16$$ needs already a lot of seconds.

However, heuristics suggest two strong reductions of the searchspace.

• it seems, there are solutions containg $$r_k=2$$ only if there are solutions $$r_k \in \{0,1\}$$ with same $$\rho$$ and $$\lambda$$ already, so actually we need only test $$R$$ containing $$r_k \in \{0,1\}$$
• it seems, after a short solution with a certain $$\rho$$ and $$\lambda_1$$ has been found, no shorter solution with $$\lambda_k \lt \lambda_1$$ occurs.

Example:

$$\rho=4$$, $$\lambda=15$$:

25 15 4  \\ a0, lambda, rho
a1vec=[25, 75, 113, 85, 1]
R=[0, 1, 1, 1]
A=[0, 1, 2, 8]
25 15 4
a1vec=[25, 75, 113, 341, 1]
R=[0, 1, 2, 1]            \\ r_3=2 occur at the same rho & lambda
A=[0, 1, 0, 10]
25 15 4
a1vec=[25, 75, 227, 341, 1]
R=[0, 2, 1, 1]             \\ r_2=2 occur at the same rho & lambda
A=[0, 0, 1, 10]


$$\rho=7$$, $$\lambda=23$$: (non optimal solution : $$\lambda \gt 15$$)

25 23 7
a1vec=[25, 19, 29, 11, 17, 13, 5, 1]
R=[1, 1, 1, 1, 1, 1, 1]
A=[2, 1, 3, 1, 2, 3, 4]
25 23 7
a1vec=[25, 19, 29, 11, 17, 53, 5, 1]
R=[1, 1, 1, 1, 2, 1, 1]
A=[2, 1, 3, 1, 0, 5, 4]
... (some more solutions with same rho, lambda)


$$\rho=9$$, $$\lambda=28$$: (non optimal solution : $$\lambda \gt 15$$)

25 28 9
a1vec=[25, 19, 57, 43, 65, 49, 37, 7, 21, 1]
R=[1, 0, 1, 1, 1, 1, 1, 0, 1]
A=[2, 0, 2, 1, 2, 2, 4, 0, 6]
25 28 9
a1vec=[25, 19, 57, 43, 65, 49, 37, 113, 85, 1]
R=[1, 0, 1, 1, 1, 1, 2, 1, 1]
A=[2, 0, 2, 1, 2, 2, 0, 2, 8]
... (a lot more solutions with same rho, lambda)


$$\rho=10$$, $$\lambda=31$$: (non optimal solution : $$\lambda \gt 15$$)
remarkable: all $$r_k \in \{1,2\}$$, no $$r_k=0$$ !

25 31 10
a1vec=[25, 19, 29, 11, 17, 13, 5, 17, 13, 5, 1]
R=[1, 1, 1, 1, 1, 1, 2, 1, 1, 1]
A=[2, 1, 3, 1, 2, 3, 0, 2, 3, 4]
... (some more solutions with same rho, lambda)



$$\rho=12$$, $$\lambda=36$$: (non optimal solution : $$\lambda \gt 15$$)

25 36 12
a1vec=[25, 19, 57, 43, 65, 49, 37, 7, 11, 17, 13, 5, 1]
R=[1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
A=[2, 0, 2, 1, 2, 2, 4, 1, 1, 2, 3, 4]
25 36 12
a1vec=[25, 19, 57, 43, 65, 49, 37, 7, 11, 17, 53, 5, 1]
R=[1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1]
A=[2, 0, 2, 1, 2, 2, 4, 1, 1, 0, 5, 4]
... (a lot more solutions with same rho, lambda)


While the first heuristic is already surprising, the latter heuristic is really astonishing and should either be improved or be dealt with attempts of proving or disproving.
In my code I use that heuristics, and jump out from the two innermost loops once a solution is found. This code-line, however, can simply be commented-out if the heuristics should be improved.

   \\ Pari/GP-code
\\ flgs: 1 - use residues 0,1 only


\ 2 - print only running minimal lambda \ 4 - find only first solution {docsolutions(a0,maxrho=12,flgs=1+4)=my(lambda,rho,minlambda,minlambdarho,Rvectors,a1,a1vec,S,A,Avec,r,rrng); if( bittest(flgs,0), rrng=[0,1], rrng=[0,2]); minlambda=999; for(rho=1,maxrho, Rvectors=vector(rho,j,rrng); minlambdarho=999; \ minimal lambda for each rho forvec(R=Rvectors, a1vec=vector(rho+1);a1vec[1]=a0; Avec=vector(rho); S=0; a1=a0; for(j=1,rho, r=R[j]; a1=3*a1+r; A=valuation(a1,2); a1>>=A; Avec[j]=A; S+=A; a1vec[1+j]=a1; if(a1==1,break()) ); if(a1<>1,next()); \ test did not converge to 1 if(a1vec[1+rho]==0,next()); \ test has converged to solution with \ smaller rho lambda=S+rho; if(bittest(flgs,1),if(lambda>=minlambdarho,next())); minlambdarho=lambda; print(a0," ",lambda," ",rho); \ for compatibility with HdB lambda-1 print(" a1vec=",a1vec); print(" R=",R); print(" A=",Avec); if(bittest(flgs,2),break(2)); \ assuming the first solution is the best \ don't test any further );\ end forvec(R=... ); \ end for(rho=... }

      docsolutions(25,10,1+2) \\ runs short test up to rho=10


This space is free for anyone to use.