<<<  2-syracuse     

Scenario empty

See details on the model

There are no tables

Question

Write a recursive query computing the syracuse sequence starting from 27. Formally you have to return the set of u_n where u_0 = 27 and u_{n+1} = u_n/2 when u_n is even and 1 + 3 × u_n otherwise.

You can use the test a%2=0 to test parity in SQL.


Query


...
Run query first