10

Fix an integer $a$, and a prime $p$.

Define $$S(a,p)=\sqrt{a+\sqrt{a+\sqrt{a+\cdots}}}\;\;(\text{mod}\;p)$$ to be the set of all integers $x\in\{0,...,p-1\}$ such that, for some positive integer $n$, $$x\equiv \sqrt{a+\sqrt{a+\sqrt{a+\cdots + \sqrt{a+x}}}}\;\;(\text{mod}\;p)$$ with exactly $n$ radicals, and where each square root evaluates to a valid modular square root.

Some examples: \begin{align*} S(2,29)&=\{2,3,4,5,7,14,18,20,21,23,28\}\\[4pt] S(3,11)&=\{0,1,6,8,9\}\\[4pt] S(4,23)&=\{0,2,8,12,14,19\}\\[4pt] S(5,7)&=\{4\}\\[4pt] \end{align*} Based on sample data, I'll pose two conjectures . . .

Conjecture $(1)$:

$\qquad$$S(a,p)\ne{\large{\varnothing}}$, for all $a,p$.

Conjecture $(2)$:

$\qquad$If $x\in S(a,p)$, then $x$ satisfies $$x\equiv \sqrt{a+\sqrt{a+\sqrt{a+\cdots + \sqrt{a+x}}}}\;\;(\text{mod}\;p)$$ $\qquad$with at most $p-1$ radicals.

Questions:

  • Can someone prove or disprove either of the conjectures?$\\[4pt]$
  • Short of that, is there some intuition for or against either of the conjectures?

Update:

I'm no longer sure about conjecture $(1)$ since it was based on flawed sample data.

Also, as noted in the comments, conjecture $(2)$ only holds for odd primes $p$, but the upper bound is too high.

I had a bug in my program -- sorry for the mistakes.

I think the idea of iterated modular square roots has potential for some interesting explorations, so I'll leave the question for now.

Hopefully after I correct my program, I'll be able to pose revised conjectures that are consistent with sample data.

Update #$2$:

Ok, my program is now corrected.

Conjecture $(1)$ looks good, but I see it's now been proved.

As previously noted, assuming $p$ is odd, conjecture $(2)$, while true, is too weak.

Thanks to everyone for the comments and answers.

quasi
  • 61,115
  • How do you choose your $\sqrt{}$? – user10354138 Jun 10 '19 at 03:54
  • @user10354138: All valid choices. – quasi Jun 10 '19 at 03:55
  • since for odd $p$ there are $(p+1)/2$ quadratic residues, wouldn't there be at most $(p+1)/2$ radicals (otherwise two of them would be repeating, and the chain of radicals could be shortened)? – Mirko Jun 10 '19 at 04:35
  • @Mirko: There are examples requiring exactly $p-1$ radicals. In particular, $S(2,157)$ has elements requiring $156$ radicals. – quasi Jun 10 '19 at 04:37
  • Well, $p-1=(p+1)/2$ when $p=3$. The example you have, is it with $p>3$, could it indeed not be shortened? That is, could you please be more specific of the example you have in mind? I just saw you added $S(2,157)$ to your comment, will think about it...which element, for example, requires $156$ radicals? – Mirko Jun 10 '19 at 04:43
  • @Mirko: Assuming I didn't make a mistake, we have $7\in S(2,157)$, and $7$ can be realized with $156$ radicals, but no fewer. – quasi Jun 10 '19 at 04:50
  • hmm, next step for me to look at exactly the chain of 156 radicals, but I feel it would be too much to ask you to list this chain :) – Mirko Jun 10 '19 at 04:52
  • @Mirko: No problem, I'll work on a producing a list (but it won't be right away). – quasi Jun 10 '19 at 05:05
  • @Mirko: It looks like my program had a bug -- $7$ doesn't require $156$ radicals -- sorry for the mistake. So your observation regarding a max chain of $(p+1)/2$ radicals now seems right. In fact, now that I think about it, your observation is obviously correct. I'll fix the program and report back . . . – quasi Jun 10 '19 at 05:28
  • Note that $S(1,2) = {0,1}$ but $x^2+x+1$ has no roots mod $2$. So, conjecture (2) is false. – WimC Jun 10 '19 at 05:38
  • @WimC: Yes, it looks like I was misled due to a bug in my program. I'm working on it. I'll need to revise the conjectures (or possibly delete the question). – quasi Jun 10 '19 at 05:40
  • don't delete, otherwise someone else will post it in the future :) Meanwhile I got the following sequence for 7 (by hand + Excel table), where each number n should be treated as $\pm n$. 7,3,28,40,55, 34,6,56,23,5, 25,59,10,13,60, 16,65,58,27,17, 31,70,51,39,77, 32,21,74,62,8, 18,45,19,53,48, 41,78,9,47,7. Pretty long (didn't count) but clearly less that $(p-1)/2$. Ok, counted, 39 iterations. – Mirko Jun 10 '19 at 05:55
  • Re Conj.2, it should be fine for primes $p>2$ (i.e. odd primes). Re Conj.1, I would think it is true, since starting with any number some repetition must occur at some point, but one would have to show this repetition goes all the way back to the starting number. From my Excel experiment, looks like only one of $\pm n$ is an exact square $\mod p$ (at least for $p=157$), if true (in general) might be obvious, need to think, perhaps later. – Mirko Jun 10 '19 at 06:05
  • I am puzzled with your edit, suggesting both conjectures are false. I think both are true (except perhaps for Conj.2 when $p=2$), need to think, but obvously if it is only this exception it is not very interesting). Re Conj.1, it is true, since starting with any number, there has to be a repetition at some point. Whether it goes back to the original number or not, it doesn't matter. As long as there is repetition, it shows that $S(a,P)$ is not empty. I may try to write all this in a neater way as an answer, if I find the time ... may just copy and paste for now. – Mirko Jun 10 '19 at 06:19
  • @Mirko: An answer would be welcome. No rush. – quasi Jun 10 '19 at 06:24
  • @Mirko: Something has to repeat unless before that happens, all partial chains fail. – quasi Jun 10 '19 at 06:29
  • yes, I just realized that, after I attempted to write an answer :) – Mirko Jun 10 '19 at 06:30
  • But thanks for the (in-progress) answer. – quasi Jun 10 '19 at 06:31
  • 1
    I find this problem very cute. If I got it right that you allow the user to select either square root (if any), then are we not really looking at solutions of $$f(f(f\cdots f(x)\cdots))=x,$$ with $f(x)=x^2-a$? This way of looking at it would make it deterministic, which may help? Anyway, this reminds me a bit of the study of the eventual periodicity of another "quadratic" modular function. My first guess is that this problem may prove to be a bit more cumbersome, but I may also be very wrong about this :-) Gotta commute. More later, I hope. – Jyrki Lahtonen Jun 10 '19 at 06:48
  • Mercio seems to have pursued that line of thought! – Jyrki Lahtonen Jun 10 '19 at 06:49
  • the 28 listed in S(4,23) is puzzling, should it be 5 (i.e. 28 mod 23)? or maybe 2,8, not 28? – Mirko Jun 10 '19 at 07:05
  • @Mirko: Yes, a typo -- it was intended as $2,8$, not $28$. – quasi Jun 10 '19 at 07:48

2 Answers2

6

let $f_{a,p} : \Bbb Z/p\Bbb Z \to \Bbb Z/p\Bbb Z $ given by $f(x) = x^2-a$.
Then $x \in S(a,p)$ if and only if there is some $n$ such that $f_{a,p}^{\circ n}(x) = x$,.

Draw a graph where the vertices are the elements of $\Bbb Z/p\Bbb Z$ and where there is an arrow from $x$ to $f_{a,p}(x)$. Then $S(a,p)$ is the set of vertives that are parts of cycles.

Iterating $f_{a,p}$ on any element eventually ends up in a cycle, so $S_{a,p}$ is non empty.

If $p=2$ then $S(a,p)$ is a bijection so every element is part of a cycle.

If $p \neq 2$, then every element $x \neq -a$ has either $0$ or $2$ preimages $y_1,y_2$, and only one of them can be part of a cycle (since $x$ can only appear once in the cycle it will have either $\ldots \to y_1 \to x \to \ldots$ or $\ldots \to y_2 \to x \to \ldots$), so $S(a,p)$ has at most $(p+1)/2$ elements (and so the cycle lengths can be at most $(p+1)/2$)

mercio
  • 51,119
2

This, for now in more like an extended comment (answering Conjecture 2, but not yet quite Conjecture 1.)

I just copy here some of my observations from the comments. I believe both conjectures are true, except perhaps the bound $p-1$ when $p=2$ (but I don't care much of this exception and didn't think in detail about it).

If $x\in S(a,p)$ where $p$ is an odd prime, then there is a chain of at most $(p+1)/2$ radicals. This is because there are at most $(p+1)/2$ quadratic residues $\mod p$ so if the chain were longer there ought to be some repetition in it, so the chain could be shortened. This shows that Conjecture 2 is correct for odd primes $p$ since in this case $(p+1)/2\le p-1$.

Re conjecture 1, it is true too. Start with any $x_0$ and iterate $x_{n+1}=\sqrt{a+x_n}$ ... I see a gap in my argument though. Assuming the square root "exists often enough", then there will be some repetition in this chain, i.e. $x_m=x_{m+k}$ for some positive integer $k$, showing that $x_m\in S(a,p)$. But I need to think of the square root "exists often enough" part of my "answer"

Edit. Aah, mercio posted an answer, there is a cycle. One need not worry about the existence of the square root, since one could find a cycle for the square function (rather than for the square root function), and once we have a cycle for the square function, then it is also a cycle for the square root function, obviously, if we walk the opposite direction. (More precisely, it is not exactly the square function, but $f(x)=x^2-a$ as in mercio's answer, as also observed just slightly later by Jyrki Lahtonen in the comments).

Mirko
  • 13,789