Crafting grafting, part 2

Before going on, let me address an omission. I gave some examples of grafting numbers but I never actually specified what a grafting number is.

A grafting number is a counting number whose digits appear (consecutively, and in order) in its square root, starting at or to the left of the decimal point.

Matt Parker excludes cases where the digits appear further to the right of the decimal point, which may seem an arbitrary restriction, but it makes sense if you think about it. We don’t know that square roots of nonsquare counting numbers are normal numbers, but it does seem plausible. A normal number is an irrational number in which every finite string of digits occurs with equal density to every other digit string of the same length. If square roots are normal then including numbers whose digits appear anywhere in their square root as grafting numbers would mean every nonsquare number is a grafting number! For instance: $\sqrt{744} = 27.27636339397171178551719510385918447020016888957751385958655644587745126\mathbf{744}79307476086...$

That would be a bore, so we just allow numbers whose digits appear beginning at or to the left of the decimal point in their square roots.

The above definition allows $\sqrt{1} = 1$ and $\sqrt{100} = 10.0$, for instance, and it probably shouldn’t, but let’s leave it as is for now.

We came up with a grafting number by first finding $\sqrt {10(3-\sqrt{5})} = \sqrt{7.639320...}=2.7639320...$, then multiplying both sides by 100, and then rounding up the number under the radical sign to an integer.

100 was an arbitrary choice, though. What if we used $10^n$? That is, candidate grafting numbers would be $\lceil 10^{2n}\times 7.639320... \rceil$.

Let’s check:

• $\sqrt{8} = 2.828...$
• $\sqrt{764} = 27.6405...$
• $\sqrt{76394} = 276.39464...$
• $\sqrt{7639321} = 2763.932162...$
• $\sqrt{763932023} = 27639.3202340...$

Seems to work every time. Notice the floor function doesn’t work, though: $\sqrt{763932022} = 27639.3202159...$ doesn’t match that last digit, for instance. It’s not obvious why the ceiling function works and the floor function doesn’t. One might think both could work, or floor but not ceiling, or neither. For that matter there’s the… superceil? The second integer higher? That works in one case: $\sqrt{765} = 27.6586...$. There’s stuff to dig into here. But let’s set it aside.

We have here a series of grafting numbers, none of which is 60755907 or 63826090875 so clearly there’s more exploration to be done.

We got the above by considering $(j+x)^2=10x$, where $j=2$. What about other values of $j$, though? Expanding gives $x^2-(b-2j)x+a^2 = 0$ and so $x = ((b-2j)\pm\sqrt{b^2-4jb})/2$. Then when $j=1$ one solution is $4-\sqrt{15}=0.1270166538...$. (We want solutions in $0 < x < 1$, so the other solution is discarded.)

So $\sqrt{1.270166538...} = 1.1270166538...$ which looks promising. Let’s check:

• $\sqrt{2} = 1.414...$ — nope.
• $\sqrt{128} = 11.3237...$ — nope.
• $\sqrt{12702} = 112.70314...$ — nope.
• $\sqrt{1270167} = 1127.016858....$ — nope.
• $\sqrt{127016654} = 11270.1665471...$ — finally!

And no, the floor function doesn’t work where the ceiling fails here (or where it succeeds). Looks like we have a way of generating candidate grafting numbers, but not necessarily good ones.

That was $j=1$ and $j=2$. For $j=3$, $10^2-40j < 0$ and there are no real solutions. So that’s that.

Except we can vary the right hand side of $(j+x)^2=10x$. The coefficient of $x$ can be any power of 10: $(j+x)^2=10^mx$. We’ll do that next time.

The grafting numbers less than a million (excluding the dubious 1, 100, and 10000) are:

nsqrt(n)
82.8284…
778.77496…
989.8994…
999.9498…
76427.64054…
76527.65863…
571175.5711585…
573675.736384…
979798.9797959…
999899.98999…
999999.99499…
76394276.394645…
997997998.997997995…
999998999.998999…
999999999.999499…