You are on page 1of 5

Double Modulus Oscillation Equation for a Positive Progression

January 25, 2011

James H. Eshuis 516 Ontario Street St. Catharines, Ontario L2N 4N3 jeshuis@vaxxine.com

I present an equation for the calculation of position when movement is an oscillation within a positive arithmetic progression. I define the equation and give four examples. write the equation in C++. For computer programmers, I

Oscillation Equation
For a positive arithmetic progression with within the progression, number of terms, and starting at term , we can oscillate,

number of terms, starting either toward the right or the left,

and determine our ending term

using the equation

or equivalent

The equation variables defined: : The ending term : The starting term : The number of terms moved. Starting toward the left (negative), or starting toward the right (positive) : The common difference : The number of terms in the progression : The first term in the progression : The last term in the progression

Examples of the Oscillation Equation


Example 1: For the following positive progression,

, the oscillation equation is

If If Example 2:

and and

then then

For the following positive progression,

, the oscillation equation is

If If

and and

then then

Example 3: For the following positive progression,

, the oscillation equation is

If If

and and

then then 3

Example 4: For the following positive progression,

, the oscillation equation is

If If

and and

then then

The Oscillation Equation in C++


The oscillation equation written in C++ is

: Absolute value 4

: The modulus (mod), gives the remainder of integer division // variables of integer type

You might also like