For any given even number sqrtAA that has mm digits and AA with nn digits, is there a relationship between mm and nn?

1 Answer
  • if nn is even, m=n/2m=n2
  • if nn is odd, m=(n+1)/2m=n+12

where mm is the number of digits in sqrtAA

Explanation:

Let's first look at a few terms and see if we can spot a pattern (I'm including the variable mm which is the number of digits in sqrtAA):

((A, n,sqrtA, m),(4,1,2,1),(16,2,4,1),(36,2,6,1),(64,2,8,1),(100,3,10,2),(144,3,12,2),(vdots, vdots, vdots, vdots))

Since A is even, then sqrtA will also be even. And so what I'll do next is look at what values of A we generate for different values of sqrtA with different m:

((A, n,sqrtA, m),(4,1,2,1),(16,2,4,1),(vdots, vdots, vdots, vdots),(64,2,8,1),(100,3,10,2),(vdots, vdots, vdots, vdots),(900,3,30,2),(1024,4,32,2),(vdots, vdots, vdots, vdots),(9604,4,98,2),(10000,5,100,3))

And so we can see relationships:

n=1, m=1
n=2, m=1
n=3, m=2
n=4, m=2
n=5, m=3

and so on.

And so we can calculate m for any n, where,

  • if n is even, m=n/2
  • if n is odd, m=(n+1)/2

Let's test it out:. Let's say sqrtA=45678, m=5=>A=2086479684, n=10 color(green)sqrt