i found a pi formula

I was playing around with number strings and noticed a really strange pattern. If you break consecutive numbers into groups that grow by one each time, a math magic trick happens where Pi (π) suddenly appears.

Here is how the grid starts:

* Group 1: 1

* Group 2: 2, 3

* Group 3: 4, 5, 6

* Group 4: 7, 8, 9, 10

* ...and so on.

Let's take Group 4 (7, 8, 9, 10) as an example. The size of this group is 4 numbers.

Now, pick each number in the group and find the absolute differences between it and all the other numbers in the same group, then add those differences up:

* For 7: The differences to 8, 9, and 10 are 1, 2, and 3. (1 + 2 + 3 = 6)

* For 8: The differences to 7, 9, and 10 are 1, 1, and 2. (1 + 1 + 2 = 4)

* For 9: The differences to 7, 8, and 10 are 2, 1, and 1. (2 + 1 + 1 = 4)

* For 10: The differences to 7, 8, and 9 are 3, 2, and 1. (3 + 2 + 1 = 6)

Next, take the reciprocal (1 divided by the sum) for each number, and add them all together:

* (1/6) + (1/4) + (1/4) + (1/6) = 0.8333

Finally, multiply that total by the size of the group (which is 4):

* 0.8333 × 4 = 3.3333

Here is the crazy part: As you go deeper down the grid and the groups get bigger, this final number locks directly onto Pi (3.14159...)!

* With a group size of 10, the answer is 3.1709

* With a group size of 100, the answer is 3.1418

* With a group size of 1,000, the answer is 3.14159

Author: Adventurous_Can_7236