Hello. Today our job is to find the N
th Pipi number.
Let us define Pn such that the following expression:
$\sqrt{P_{0}+\sqrt{P_{1}+\sqrt{P{_2}+\sqrt{...\sqrt{P_{n-1}+\sqrt{P_n}}}}}}$
is equal to n
, if P0 = 0.
pipi(0) == 0
because
$0 = 0$
pipi(1) == 1
because
$0+\sqrt{1} = 1$
pipi(2) == 9
because
$0+\sqrt{1+\sqrt{9}} = 2$
pipi(3) == 3025
because
$0+\sqrt{1+\sqrt{9+\sqrt{3025}}} = 3$
From `0` to `22`.