$\mathbf{Algorithm}\ \HelloWorld(n)\mathrm{:}$
$\mathbf{if}\ n = 0\ \mathrm{or}\ n = 1$
$\mathbf{then}\ \mathrm{print}\ \mathit{Hello}\ \mathit{World}$
$\mathbf{else}\ \mathbf{if}\ n \text{ is a multiple of } 3$
$\qquad \mathbf{then}\ \HelloWorld\left( n \middle/ 3 \right);$
$\qquad \qquad \ \ \mathrm{print}\ \mathit{Hello}\ \mathit{World};$
$\qquad \qquad \ \ \HelloWorld\left( 2n \middle/ 3 \right)$
$\qquad \mathbf{else}\ \HelloWorld(n + 1)$
$\qquad \mathbf{endif};$
$\mathbf{endif}$