Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJComments has a deprecated constructor in /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php on line 25 Call Stack: 0.0002 360664 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.0512 1210720 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.0512 1210720 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.1305 4043808 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.1320 4071152 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.1328 4088864 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.1329 4105872 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.1337 4113608 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.1337 4113608 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.1842 4738424 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.1866 4823656 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.1872 4844584 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.1982 4996536 13. Joomla\CMS\Plugin\PluginHelper::importPlugin() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:189 0.1982 4996792 14. Joomla\CMS\Plugin\PluginHelper::import() /var/www/astarmathsandphysics/libraries/src/Plugin/PluginHelper.php:182

## Arithmetic Sequences

An arithmetic sequence is any sequence where a fixed number is added to a term to get the next term.
3, 7, 11, 15, 19
is an arithmetic sequence with 4 being added to each term to get the next term.
Given any arithmetic sequence we can find an expression for the
$n$
th term. If
$d$
is the number that is added each time (called the common difference) and
$a$
is the first term, then the
$n$
th term is
$a_n=a+(n-1)d$
.
For the sequence above,
$a=3, \: d=4$
.
Hence
$a_n=3+(n-1) \times 4=4n-1$

We can also find a formula for the sum
$S_n$
of the first
$n$
terms.
$S_n=a+(a+d)+...(a+(n-2)d)+ (a+(n-1)d)$

Writing this sum backwards gives
$S_n=(a+(n-1)d)+(a+(n-2)d)+...+ (a+d)+a$

Now adding these two sums gives
\begin{aligned} 2S_n &= \underbrace{(a+(n-1)d)+(a+(n-1)d)+...+ (a+(n-1)d)+(a+(n-1)d)}_{n \: terms} \\ &= n(2a+(n-1)d) \end{aligned}

Hence
$S_n=\frac{n}{2}(2a+(n-1)d)$

For the sequence above the sum of the first 20 terms is
$S_{20}=\frac{20}{2} \times 3+(20-1) \times 4)=820$