#05AB1E (legacy), (削除) 26 (削除ここまで) 24 bytes
Δ©ÅA®PYzmY®zO/®nÅAt)4V}н
Try it online or see the steps of all test cases.
Explanation:
Δ # Loop until the list no longer changes:
© # Store the current list in the register (without popping)
# (which is the implicit input-list in the first iteration)
ÅA # Calculate the arithmetic mean of this list
®P # Take the product of the list
Yz # And 1/`Y`
m # Then take the result of the product to the power of 1/`Y`
# (NOTE: a^(1/4) is the same as 4√a)
®z # Get 1/x for each value x in the list
O # Take the sum of that
Y / # And then divide `Y` by that sum
®n # Take 2 to the power of each number x in the list
ÅA # Calculate the arithmetic mean of this list
t # And then take the square-root of that
) # Wrap all four results into a list
4V # And set variable `Y` now to 4 instead of 2
}н # After the list no longer changes: pop and push its first value
# (which is output implicitly as result)
Kevin Cruijssen
- 136.2k
- 14
- 154
- 394