Re: number sequence
- From: "snapdragon31" <snapdragon31@xxxxxxxxx>
- Date: 30 Aug 2005 17:27:22 -0700
It is a sequence with the following definition
a(1) = 2
a(n+1) = a(n) + 4^n
a(n+1)
= a(n) + 4^n
=a(n-1) + 4^(n-1) + 4^n
=a(n-2) + 4^(n-2) + 4^(n-1) + 4^n
= ...
= 2 + sum(i=1 to n-1) 4^i
a(1) = 2
a(2) = 2 + 4^1 = 6
a(3) = 2 + 4^1 + 4^2 = 2 + 4 +16 = 22
a(4) = 2 + 4^1 + 4^2 + 4^3 = 2 + 4 + 16 + 64 = 86
a(5) = 2 + 4^1 + 4^2 + 4^3 + 4^4 = 2 + 4 + 16 + 64 + 256 = 342
The equation can furthur simplified using the sum of geometric series
method
If Sn = a + ar + ar^2 + ... + ar^(n-1)
then Sn = a * (r^n - 1) / (r - 1)
2 + sum(i=1 to n-1) 4^i
= 2 + (4^1 + 4^2 + ... 4^(n-1))
= 2 + 4 * (4^(n-1) - 1) / (4 - 1)
= 2 + (4^n - 4)/3
a(1) = 2 + (4^1 - 4)/3 = 2
a(2) = 2 + (4^2 - 4)/3 = 2 + 4 = 6
a(3) = 2 + (4^3 - 4)/3 = 2 + 20 = 22
a(4) = 2 + (4^4 - 4)/3 = 2 + 84 = 86
a(5) = 2 + (4^5 - 4)/3 = 2 + 340 = 342
I hope that "2 + (4^n - 4)/3" is the equation you are looking for.
.
- References:
- number sequence
- From: Russ
- number sequence
- Prev by Date: Re: infinity
- Next by Date: Re: Looking for an algorithm to accomplish the following
- Previous by thread: Re: number sequence
- Next by thread: Re: number sequence
- Index(es):
Relevant Pages
|