x=scan(n=3);y=diff(x);z=y[2]/y[1];c(z,x[2]-x[1]*z)
2 5 14
[1] NA NA
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!