Math

Lemniscate of Bernoulli

The Lemniscate of Bernoulli is a fascinating plane curve discovered by the Swiss mathematician Jakob Bernoulli in 1694. Its characteristic figure-eight shape makes it one of the most recognizable curves in mathematics. The curve can be defined as the set of points for which the product of the distances to two fixed points (foci) remains constant.

Finding the Remainder of \(9^{2018} \mod 7\) - Understanding Modular Patterns

When you first see an expression like

\[ 9^{2018} \mod 7, \]

it looks impossible to compute. The number \(9^{2018}\) is unimaginably large — far beyond what any calculator can display.

Fortunately, modular arithmetic has a wonderful property: even enormous powers often fall into small repeating cycles. Once you notice the pattern, the problem becomes surprisingly simple.

This post walks you through the reasoning step by step.