kill(all)$

load(solve_rec)$

van=facebook.com/LearningCalculus$

Y: create_list(i, i, 1, 34)$
Y[2]:4$

for i: 3 thru 34 do
Y[i]:2*(Y[i-1]-Y[i-2])$

print("Answer ", firstn(Y,17))$
print("Answer ",  lastn(Y,17))$

Y[34];

Y(x):=rhs(solve_rec(y[x] = 2*(y[x-1]-y[x-2]), y[x],y[1]=1,y[2]=4))$ Y(x);

y(x):=''(realpart(Y(x)));

y(34);