This is a 'finite calculus' (differences & summations) problem.
You can solve it using difference operator (actually its inverse which gives
you the discrete integration which is nothing but summation).
If you do not know finite calculus, Google for it (or refer Concrete
Mathematics by Knuth).

The solution for any k is.

*f(n) = nC(k+1) + nC(k-1) + nC(k-3) + .... (all the way down to nC0 or nC1
depends on k is odd or even).*

Here nCr is the binomial coefficient "n choose r".

Eg: Let k = 3, n = 4

f(4) = 4C4 + 4C2 + 4C0 = 1 + 6 + 1 = 8

Another, k = 3 and n = 5

f(5) = 5C4 + 5C2 + 5C0 = 5 + 10 + 1 = 16


On Wed, Nov 4, 2009 at 11:23 AM, abhijith reddy <abhijith200...@gmail.com>wrote:

> Is there a way to find the sum of the Kth series ( Given below)
>
> K=0   S={1,2,3,4,5,6,....}
> K=1   S={1,2,4,7,11,16..}  common diff = 1,2,3,4 5 ...
> K=2   S={1,2,4,8,15,26...} common diff = 1,2,4,7 11... (series with
> K=1)
> K=3   S={1,2,4,8,16,31...} common diff = 1,2,4,8 15... (series with
> K=2)
>
> Note that the common difference of Kth series is the (K-1) series
>
> Any ideas ??
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.


Reply via email to