Square Roots

My daughter and I were recently playing with python’s square root function. She discovered that if you evaluate an even number of ones, the square root is half that number of three’s on both sides of the decimal. So ?11 is approximately 3.3, and the ?1111 is approximately 33.33, and so forth. We learned that this continues until there are eight three’s on either side of the decimal point, then they reduce in frequency.

The square root of an odd number of ones is also patterned. ?1 is 1, ?111 is 10.5, ?11111 is 105.4, ?1111111 is 1054.0, and so forth.

So we decided to write a python program to generate 20 instances. Here is the program:

#! /usr/bin/env python3
“””Determines the square roots of numbers comprised of ones like 11, 111, 1111, etc.”””
import math
bobby = 10
sue = 1
for x in range(1,20):
   answer = bobby + sue 
   sue = answer
   bobby = bobby*10
   print(x+1, ‘\tThe square root of ‘, answer, ‘ is ‘, math.sqrt(answer))

And here are the answers:

2 The square root of  11  is  3.3166247903554
3 The square root of  111  is  10.535653752852738
4 The square root of  1111  is  33.331666624997915
5 The square root of  11111  is  105.40872829135166
6 The square root of  111111  is  333.333166666625
7 The square root of  1111111  is  1054.0925006848308
8 The square root of  11111111  is  3333.3333166666666
9 The square root of  111111111  is  10540.925528624135
10 The square root of  1111111111  is  33333.33333166667
11 The square root of  11111111111  is  105409.25533841894
12 The square root of  111111111111  is  333333.33333316667
13 The square root of  1111111111111  is  1054092.553389407
14 The square root of  11111111111111  is  3333333.3333333167
15 The square root of  111111111111111  is  10540925.533894593
16 The square root of  1111111111111111  is  33333333.333333332
17 The square root of  11111111111111111  is  105409255.33894598
18 The square root of  111111111111111111  is  333333333.3333333
19 The square root of  1111111111111111111  is  1054092553.3894598
20 The square root of  11111111111111111111  is  3333333333.3333335

Although it looks like the sixes also multiply, they also reduce after reaching eight in a row. Check it out with python’s decimal package. from decimal import Decimal, then in the print statement, add Decimal(math.sqrt(answer)).