raghu@fshvmfk1.vnet.ibm.com (06/18/91)
>Subject: expression for F(n) = a**0 + a**1 + ... + a**(n-1) + a**n >From: ping@bnlux1.bnl.gov (Shiping Zhang) >Message-ID: <1991Jun18.022651.16732@bnlux1.bnl.gov> >Date: 18 Jun 91 02:26:51 GMT > >I'm wondering if there is an expression for F(n) = a**0 + a**1 + ... +a**n >in term of both a and n. Here a is a constant. I know the expression fr >a = 2, which is 2**(n+1) -1. But now I want to know the expression fo >any constant a. Thanks for any help. > >-ping F(n) is a geometric series, where the ith term is given by the the recurrence relation : T(i) = r*T(i-1) r is called the common ratio. The sum of n terms is T(0) * (r**n - 1) / (r - 1) In your case T(0) = 1, r = a, n = n+1, so the sum is (r**(n+1) - 1) / (r -1). If r = a = 2, the sum is is the same as the one you have. Raghu V. Hudli IBM Corp ====================================================================== Disclaimer: The opinions/views expressed in this note are my own and do not necessarily reflect those of my employer.
bs@faron.mitre.org (Robert D. Silverman) (06/18/91)
In article <1991Jun18.022651.16732@bnlux1.bnl.gov> ping@bnlux1.bnl.gov writes: >I'm wondering if there is an expression for F(n) = a**0 + a**1 + ... + a**n >in term of both a and n. Here a is a constant. I know the expression for >a = 2, which is 2**(n+1) -1. But now I want to know the expression for >any constant a. Thanks for any help. I hate to be insulting but..... You're joking right??? This is a simple problem in high school level mathematics. I won't answer it, but I'll give a hint: Geometric Series. Enough said???? I wouldn't expect John Doe off the street to know this, but the fact that someone where you work does not know high school math is scary. -- Bob Silverman #include <std.disclaimer> Mitre Corporation, Bedford, MA 01730 "You can lead a horse's ass to knowledge, but you can't make him think"
FC03@NS.CC.LEHIGH.EDU (Frederick W. Chapman) (06/19/91)
>I'm wondering if there is an expression for F(n) = a**0 + a**1 + ... + a**n >in term of both a and n. Here a is a constant. I know the expression for >a = 2, which is 2**(n+1) -1. But now I want to know the expression for >any constant a. Thanks for any help. There is a simple trick for finding a closed form expression for your function F(n). First, if a=1, it is clear that F(n) = n+1. Now consider the case where a is not 1. Then a-1 is nonzero, and we can multiply and divide F(n) by a-1. Expanding and simplifying the numerator gives the desired result (all but two of the terms in the numerator will cancel): F(n) = (a - 1) * (a**0 + a**1 + ... + a**n) / (a - 1) = {(a**1 + a**2 + ... + a**(n+1)) - (a**0 + a**1 + ... + a**n)} / (a - 1) = (a**(n+1) - 1) / (a - 1) Your function F(n) is referred to as "the sum of a finite geometric series", or as "the nth partial sum of an infinite geometric series". ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Frederick W. Chapman (N3IJC) Campus Phone: (215) 758-3218 User Services Group Network Server UserID: FC03 Computing Center Internet: FC03@NS.CC.LEHIGH.EDU Lehigh University Bitnet: FC03@LEHIGH
ping@bnlux1.bnl.gov (Shiping Zhang) (06/19/91)
Thanks to all who helped with my question. And apology to those who feel my question insulting. -ping