ciag(N) :- ( N = 0-> X = 0; ( N = 1 -> X = 2 ; X is ciag(n-1) + 2*ciag(n-2) ).
ciag(0).
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!