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.