2

Knowing that:

  • $n$ is an integer going from zero to infinity,

  • $f(n)=n$,

  • $g(n)=n\sqrt3$.

I need a formula for $h(n)$ that can generate the series: $0, 1, \sqrt3, 2, 3, 2\sqrt3, 4, 5, 3\sqrt3, 6, 4\sqrt3 ... $ as a function of $n$.

$h(n)$ is a series that contains all elements of $f(n)$ and $g(n)$ in ascending order.

3 Answers3

4

You don't want the formula; it is going to be ugly.

.

.

.

.

.

.

Well, you've been warned. Have it, then: $$h(n) = \min\left(\sqrt3\left\lceil{n\over1+\sqrt3}\right\rceil,\left\lceil{n\sqrt3\over1+\sqrt3}\right\rceil\right)$$

where $\lceil\cdot\rceil$ is of course the ceiling function.

Ivan Neretin
  • 12,835
  • 1
    that's a possibility too, at least it gives the same results than mine :-) I just went for full decomposition. – zwim Jan 26 '21 at 18:59
  • 1
    I believe yours is the same as mine, once you get rid of all those unnecessary intermediate variables. I started with a bunch of these too, then opted for greater clarity. – Ivan Neretin Jan 26 '21 at 19:02
  • Your formula might be ugly but it is useful for finding the coordinates of all points of the double (aperiodic) grid of this problem: "Is it possible to draw all regular polygons on a double grid formed by a rational and an irrational grid, superimposed?" https://math.stackexchange.com/questions/3995508/is-it-possible-to-draw-all-regular-polygons-on-a-double-grid-formed-by-a-rationa – Robert Werner Jan 26 '21 at 21:08
2

This is not an answer to the question, but I did want to add a fun fact about the sequence. If you center a circle on a point in a triangular lattice, then this sequence describes the length of all possible radii in which the boundary of the circle touches only six points.

1

The indices when roots appear seems to be oeis.org/A054088

Based on this I propose the following:

  • $\phi(n)=n+\lfloor(n\sqrt{3})\rfloor\qquad$ the indices of $x\sqrt{3}$ numbers

  • $\Phi(n)=\lceil\frac n{1+\sqrt{3}}\rceil\qquad$ the $x$ before $\sqrt{3}$, i.e. $\phi^{-1}$

  • $\delta(n)=\Phi(n+1)-\Phi(n)\in\{0,1\}\qquad$ indicates that this $n$ is a root

  • $N(n)=n+1-\Phi(n)\qquad$ the natural numbers mingled between the roots

The resulting formula: $$h(n):\begin{cases}N(n)&\quad&\delta(n)=0\\\Phi(n)\sqrt{3}&&\delta(n)=1\end{cases}$$

Or without piecewise selection $h(n)=\delta(n)\Phi(n)\sqrt{3}+(1-\delta(n))N(n)$

zwim
  • 28,563