Simple Somos Sequence Calculator
An old Russian olympiad problem asked to prove that the sequence generated by the following algorithm
a1 = 1, a2 = 1,
an = (an-12 + 2) / an-2, n ≥ 3.
consists entirely of positive integers.
A proof of this fact can be found on a separate page, where it was also observed that the statement holds when 2 in the numerator is replaced with any positive integer m. The applet below generates as many members of the sequence as fit the applet drawing area. This is a spreadsheet and you can modify the entry B1, that carries the value of m, manually.