🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.theory
Article #1823

RE: expression for F(n) = a**0 + a**1 + ...

#1823
From: Frederick W. Chapman
Date: Tue, 18 Jun 1991 20:09
26 lines
1694 bytes
>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
Technical Details
Message-ID: <18069115.09.22FC03@lehigh.bitnet>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!vax1.cc.lehigh.edu!lehigh.bitnet!FC03

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!vax1.cc.lehigh.edu!lehigh.bitnet!FC03
From: FC03@NS.CC.LEHIGH.EDU (Frederick W. Chapman)
Newsgroups: comp.theory
Subject: RE: expression for F(n) = a**0 + a**1 + ...
Message-ID: <18069115.09.22FC03@lehigh.bitnet>
Date: 18 Jun 91 20:09:43 GMT
Lines: 26