C# Arithmetic progression,etc


hello need advice. i'm doing console application, gets first 8 terms of sequence , lists 8 others.

sample input (an+1 = an * 2 + 2):
1,4,10,22,46,94,190,382

exit:

766,1534,3070,6142,12286,24574,49150,98302.

task of program therefore estimate of sequence , determine how continue.

advice.




task of program therefore estimate of sequence , determine how continue.

advice.


hi,

you mean have sequence of numbers , want find rule next item?

you have implement logic determining next item. there's no other answer in opinion. take given sequence , apply tests getting next known item , verify then...

btw sequence a,n+1 = a,n + 3*i, step-count. sequence more 1 answer...

if have "rule" easier. write logic apply operations (+ - * / etc) , start @ 1 , perform enough iterations.

if want way, rewrite "rule" in way .net read expression , use tool or js.net evaluate formula.

regards,

  thorsten





Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to fix error Msg 1801, Level 16, State 3, Line 1

How to Share webservice object to all user