Here is the square root of 2:

√2 = 1·414213562373095048801688724209698078569671875376948073176679738...

Here is the square root of 20:

√20 = 4·472135954999579392818347337462552470881236719223051448541794491...

And here are the first few triangular numbers:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035...

What links √2 and √20 strongly with the triangular numbers? At first glance, nothing does. The square roots of 2 and 20 are very different from the triangular numbers. Square roots like those are irrational, that is, they can’t be represented as a fraction or ratio of integers. This means that their digits go on for ever, never falling into a regular pattern. So the digits are hard to calculate. The sequence of triangular numbers also goes on for ever, but it’s very easy to calculate. The triangular numbers get their name from the way they can be arranged into simple triangles, like this:

* = 1

*

** = 3

*

**

*** = 6

*

**

***

**** = 10

`*
**
***
****
***** = 15
`

The 1st triangular number is 1, the 2nd is 3 = 1+2, the 3rd is 6 = 1+2+3, the 4th is 10 = 1+2+3+4, and so on. The n-th triangular number = 1+2+3…+n, so the formula for the n-th triangular number is n*(n+1)/2 = (n^2+n)/2. So what’s the 123456789th triangular number? Easy: it’s 7620789436823655 (see A077694 at the OEIS). But what’s the 123456789th digit of √2 or √20? That’s not easy to answer. But here’s something else that is easy to answer. If tri(n) is the n-th triangular number, what are the values of n when tri(n) is one digit longer than tri(n-1)? That is, what are the values of n when tri(n) increases in length by one digit? If you look at the beginning of the sequence, you can see the first three answers:

__1__, 3, 6,__10__, 15, 21, 28, 36, 45, 55, 66, 78, 91,__105__...1 is one digit longer than nothing, as it were, and 1 = tri(1); 10 is one digit longer than 6 and 10 = tri(4); 105 is one digit longer than 91 and 105 = tri(14). Here are some more answers, giving triangular numbers on the left, as they increase in length by one digit, and the n of tri(n) on the right:

1 ← 1

10 ← 4

105 ← 14

1035 ← 45

10011 ← 141

100128 ← 447

1000405 ← 1414

10001628 ← 4472

100005153 ← 14142

1000006281 ← 44721

10000020331 ← 141421

100000404505 ← 447214

1000001326005 ← 1414214

10000002437316 ← 4472136

100000012392316 ← 14142136

1000000042485480 ← 44721360

10000000037150046 ← 141421356

100000000000018810 ← 447213595

1000000000179470703 ← 1414213562

10000000002237948990 ← 4472135955

100000000010876002500 ← 14142135624

1000000000022548781025 ← 44721359550

10000000000026940078203 ← 141421356237

100000000000242416922750 ← 447213595500

1000000000000572687476751 ← 1414213562373

10000000000004117080477500 ← 4472135955000

100000000000007771272992046 ← 14142135623731

1000000000000031576491575006 ← 44721359549996

10000000000000140731196136705 ← 141421356237310

100000000000000250760786750861 ← 447213595499958

1000000000000000638090771126060 ← 1414213562373095

10000000000000000479330922588410 ← 4472135954999579

100000000000000000169466805816725 ← 14142135623730950

1000000000000000025572412483843115 ← 44721359549995794

10000000000000000087657358700327265 ← 141421356237309505

100000000000000000097566473134542830 ← 447213595499957939

1000000000000000000987561276980703725 ← 1414213562373095049

10000000000000000003048443380954913921 ← 4472135954999579393

100000000000000000006832246143819194316 ← 14142135623730950488

1000000000000000000014155501020518731556 ← 44721359549995793928

1 ← 1

10 ← 4

105 ← 14

1035 ← 45

10011 ← 141

100128 ← 447

1000405 ← 1414

10001628 ← 4472

100005153 ← 14142

1000006281 ← 44721

10000020331 ← 141421

100000404505 ← 447214

1000001326005 ← 1414214

10000002437316 ← 4472136

100000012392316 ← 14142136

1000000042485480 ← 44721360

10000000037150046 ← 141421356

100000000000018810 ← 447213595

1000000000179470703 ← 1414213562

10000000002237948990 ← 4472135955

100000000010876002500 ← 14142135624

1000000000022548781025 ← 44721359550

10000000000026940078203 ← 141421356237

100000000000242416922750 ← 447213595500

1000000000000572687476751 ← 1414213562373

10000000000004117080477500 ← 4472135955000

100000000000007771272992046 ← 14142135623731

1000000000000031576491575006 ← 44721359549996

10000000000000140731196136705 ← 141421356237310

100000000000000250760786750861 ← 447213595499958

1000000000000000638090771126060 ← 1414213562373095

10000000000000000479330922588410 ← 4472135954999579

100000000000000000169466805816725 ← 14142135623730950

1000000000000000025572412483843115 ← 44721359549995794

10000000000000000087657358700327265 ← 141421356237309505

100000000000000000097566473134542830 ← 447213595499957939

1000000000000000000987561276980703725 ← 1414213562373095049

10000000000000000003048443380954913921 ← 4472135954999579393

100000000000000000006832246143819194316 ← 14142135623730950488

1000000000000000000014155501020518731556 ← 44721359549995793928

Can you spot the patterns? When tri(n) has an odd number of digits, n approximates the digits of √2; when tri(n) has an even number of digits, n approximates the digits of √20. And what can you call the approximations? Well, in a way they’re triangular roots so I’m calling them troots. Here are the troots for tri(n) with an odd number of digits:

1 → 1

14 → 105

141 → 10011

1414 → 1000405

14142 → 100005153

141421 → 10000020331

1414214 → 1000001326005

14142136 → 100000012392316

141421356 → 10000000037150046

1414213562 → 1000000000179470703

14142135624 → 100000000010876002500

141421356237 → 10000000000026940078203

1414213562373 → 1000000000000572687476751

14142135623731 → 100000000000007771272992046

141421356237310 → 10000000000000140731196136705

1414213562373095 → 1000000000000000638090771126060

14142135623730950 → 100000000000000000169466805816725

141421356237309505 → 10000000000000000087657358700327265

1414213562373095049 → 1000000000000000000987561276980703725

14142135623730950488 → 100000000000000000006832246143819194316

14142135623730950488... = √2 (without the decimal point)

1 → 1

14 → 105

141 → 10011

1414 → 1000405

14142 → 100005153

141421 → 10000020331

1414214 → 1000001326005

14142136 → 100000012392316

141421356 → 10000000037150046

1414213562 → 1000000000179470703

14142135624 → 100000000010876002500

141421356237 → 10000000000026940078203

1414213562373 → 1000000000000572687476751

14142135623731 → 100000000000007771272992046

141421356237310 → 10000000000000140731196136705

1414213562373095 → 1000000000000000638090771126060

14142135623730950 → 100000000000000000169466805816725

141421356237309505 → 10000000000000000087657358700327265

1414213562373095049 → 1000000000000000000987561276980703725

14142135623730950488 → 100000000000000000006832246143819194316

14142135623730950488... = √2 (without the decimal point)

When I first found these patterns, I thought I might have discovered something mathematically profound. I hadn’t. Troots are trivial. I think troots are beautiful too, but a little thought soon showed me how easily and obviously they arise. Remember that the formula for tri(n), the n-th triangular number, is tri(n) = (n^2+n)/2. As you can see above, when tri(n) is increasing in length by one digit, it rises above the next power of 10, which always begins with 1 followed by only 0s. Therefore n^2+n will begin with the digit 2 followed by some 0s, which then becomes 1 followed by some 0s as (n^2+n) is divided by 2. So n for tri(n) increasing-by-one-digit will be the first integer, n, where n^2+n yields a number with 2 as the leading digit followed by more and more 0s.

And that’s why n approximates the digits of √2·0000… and √20·0000…, for tri(n) with an odd and even number of digits, respectively. Similar trootful patterns exist in other bases and for other polygonal numbers, like the square numbers, the pentagonal numbers and so on. The troots are beautiful to see but trivial to explain. All the same, there is a sense in which you can say the mindless sequence of triangular numbers is “calculating” the digits of √2 and √20. It even rounds up the final digits when necessary:

141421__4__ → 1000001326005

1414213__6__ → 100000012392316

141421356 → 10000000037150046

141421356... = √2

[...]

1414213562__4__ → 100000000010876002500

141421356237 → 10000000000026940078203

141421356237... = √2

[...]

1414213562373__1__ → 100000000000007771272992046

1414213562373__10__ → 10000000000000140731196136705

1414213562373095 → 1000000000000000638090771126060

1414213562373095... = √2

[...]

141421356237309504__9__ → 1000000000000000000987561276980703725

14142135623730950488 → 100000000000000000006832246143819194316

14142135623730950488... = √2