series problem

hi guys
i have hard time understanding this question
write a program that accept single positive integer as an input and generates
outputs all the elements of the fallowing series (1)even and (2) less than the input number.note the first two elements of the series 1 and 2 and subsequent elements are calculated by:

1,2,(1+2*3)=7,(2+7*4)=30,(7+30*5)=157,(30+157*6)=972

thank you very much if you help me
Last edited on
You have a series defined recursively by:
S0 = 1
S1 = 2
And for all n after that:
Sn = Sn-2 + Sn-1 * (n+1)

The problem wants you to make a program to calculate the elements up until some n the user inputs, but only display them if they are even.
Topic archived. No new replies allowed.