As negative numbers can be used as bases for numeral systems (e.g. negadecimal), and non-integers such as the golden ratio $φ$ can also be used as bases, I have tried to find information on whether base negative $φ$ (‘nega-phinary’) is feasible. It's clear how to interpret a string of 0’s and 1’s as a base $-φ$ representation (in the usual way by multiplying each digit with $(-φ)^n$ and then sum), but I haven’t found anything on converting a number to nega-phinary.
I’ve written a program that iterates through nega-phinary representations such as $10010.00001$, calculates their values, and converts them to ‘ordinary’ base $φ$. The patterns of 1’s often are the same up to translation and reflection, e.g.
- $100.1_{-φ} = 10.01_φ = 2$
- $100.10001_{-φ} = 10.001001_φ = \dfrac{15-5 \sqrt 5}{2}$
but not always:
- $10000.00101_{-φ} = 1010.100001_φ = 11-2 \sqrt 5$
The usual approach of converting a number to a negative base (e.g. $83_{10} = 123_{-10}$ because $8 = 10-2$, and $1$ carries over to the next place) doesn’t work because we would end up with digits such as $(φ-1)$ which are not allowed.
One obvious thing is that, if a number can be written in nega-phinary, it can be written without any consecutive 1’s because $11_{-φ} = -φ+1 = (-φ)^{-1} = 0.1_{-φ}$; this is analogous to base $φ$.
Questions:
- Can every positive integer be represented in base $-φ$ with the digits $0$ and $1$? Equivalently, is every positive integer the sum of some powers of $-φ$ (including negative powers)?
- How can we find such representations except by brute force? Is there an algorithm?
- What about non-integers and negative numbers, are they representable in nega-phinary (presumably with infinite expansions in most cases)?
Thanks in advance!
Edit regarding negative integers:
Negative $1$ can be represented as $$ 0.\overline {10}_{-φ} = \sum_{i=0}^\infty (-φ)^{-2i-1} = (-φ)^{-1} \sum_{i=0}^\infty (-φ)^{-2i} = (1-φ) \dfrac 1 {1-(-φ)^{-2}} = \dfrac {1-φ} {1-(2-φ)} $$
Every real number does have a representation using digits $0$ and $1$ in base $-\varphi$, and without any consecutive $1$ digits.
Proof:
Take any real number $x$.
Let $N$ be an even integer large enough that $-\varphi^N \leq x \leq \varphi^{N+1}$. We'll define the sequences $(r_n)$ and $(d_n)$ for integers $n \leq N$; they have decreasing rather than increasing index.
Let $r_N = x (-\varphi)^{-N} = x\varphi^{-N}$ (since $N$ is even). Then for each $n \leq N$, recursively define
$$ d_n = \begin{cases} 0 & r_n \leq \varphi^{-1} \\ 1 & r_n > \varphi^{-1} \end{cases} $$ $$ r_{n-1} = -(r_n-d_n)\varphi $$
Induction will show that for every $n \leq N$,
$$ -1 \leq r_n \leq \varphi $$
$$ x = r_n (-\varphi)^n + \sum_{k=n+1}^N d_k (-\varphi)^k $$
The equation relating $x$ to $r_n$ and the sequence of digits is simple to show from base case $r_N$ and the equation for $r_{n-1}$.
For the inequalities $-1 \leq r_n \leq \varphi$, the base case comes from the definitions of $N$ and $r_N$. Assume by way of induction it's true of $r_n$.
If $r_n \leq \varphi^{-1}$, then $d_n = 0$, $r_{n-1} = r_n(-\varphi)$, and $$-1 = \varphi^{-1}\cdot (-\varphi) \leq r_{n-1} \leq (-1)\cdot(-\varphi) = \varphi$$
If $r_n > \varphi^{-1}$, then $d_n = 1$, $r_{n-1} = (r_n-1)(-\varphi)$, and
$$ \begin{align*} r_{n-1} &\geq (\varphi-1) \cdot (-\varphi) = -\varphi^2 + \varphi = -1 \\ r_{n-1} &< (\varphi^{-1}-1) \cdot (-\varphi) = -1+\varphi = \varphi^{-1} \end{align*} $$
This shows both that $-1 \leq r_{n-1} < \varphi^{-1} < \varphi$, and that if $d_n=1$ then $d_{n-1}=0$.
Finally, since $ \left| r_n (-\varphi)^n \right| \leq \varphi^{n+1} $, we know $\lim_{n \to -\infty} r_n (-\varphi)^n = 0$, so
$$ x = \sum_{k=-\infty}^N d_k (-\varphi)^k $$
which is a representation of $x$ as desired.
It may happen that $r_n$ is zero at some point, so all the remaining $d_n$ will be $0$, and the representation is finite. Or the sequence $(r_n)$ can repeat a value exactly, which will make the $d_n$ sequence from that point forward periodic, giving a repeating representation.
(Example or two, maybe later.)