Number theory giving you sleepless nights? Take a nap - Nap1.

Nap1 is your first number theory application.

Calculate accurately up to 100,000 digits (40,000 on older devices) using its free arbitrary precision calculator. Then use one of the many special purpose calculators that implements algorithms such as the Euclidean algorithm, linear congruence theorem or Chinese remainder theorem. All these provide detailed, step by step explanations of the algorithm. Then see how these are applied today in the encryption section and learn how to encrypt and decrypt secret messages.

Learn number theory concepts such as
- modulus and congruence
- prime numbers (including a powerful primality tester and large prime number finder)
- Euclidean algorithm to calculate the GCD with
- extended Euclidean algorithm to solve for the GCD coefficients
- linear congruence theorem and modular multiplicative inverses
- congruent powers by successive squaring
- congruent roots
- Chinese remainder theorem to solve simultaneous congruences or share secrets with
- Fermat's little theorem, Euler's phi and Garner's formula.

After mastering these, move on to encrypt and decrypt secret messages. Learn how these concepts are applied today in the RSA Cryptosystem and see all the calculations required in detail.


Nap1 was born in a South African mathematics club. The
following gives a brief overview of how that happened.
It was written by Dr Danie Brink.

I am a South African number theory enthusiast
who teaches some of the principles of number
theory to high school students in South Africa.
I do this at a math club in the afternoon in
Pretoria, South Africa. The math club is an
extramural activity for students who are
talented at mathematics and who like to do math
just for the fun of it.

At math club, we look at modular arithmetic and
congruence, Fermat’s Little Theorem, Euler’s
Formula, the Euler Phi-function, the Euclidean
algorithm and consecutive squaring. The
highlight of the course is where we combine
these skills and use them to encrypt messages
using the RSA algorithm.

The culmination of the course happens when I
publish a secret message on the Internet at a
specific time. Students have to access the
Internet at this time, from the comforts of
their own homes, and use their number theory
skills and knowledge of the RSA method to
decrypt the message. When they have successfully
decrypted the secret message, they text this
message to my phone. Students also have to take
pictures of all their work and send that to me –
we do this so that we can verify that no other
tools, other than paper, pencil and a basic
calculator has been used to do the math. I sit
at home and verify the message and declare a
winner. I am currently busy with the fifth
course and students are loving it every time.

Last year, I invited adults to take part and
this is where I met MG Ferreira, a very clever
mathematician. MG quickly caught on to the
course and was soon writing programs to do the
encryption and decryption at the click of a
button. We had breakfast together and decided to
write a number theory app. That day was the
start of the very difficult birth of the world’s
best (and by all accounts, first) number theory
app, called NAP1.

What's New

Version 1.7.0

o Prime number finder! Now you can search for primes using your mobile device. Less than a minute for 100 digit primes!!!
o Bug fixes and enhancements to the calculating engine - borrowed from our other app fdm that uses the same calculating engine.
o New random number generator (mixmax, see for more information), also borrowed from fdm.

A new bonus section has been added that contains a prime number finder. Enter any number or use the new random number generator to start at a random position with a number with 75 digits or more. Then start searching. It will search for and return the first 5 prime numbers found.

Ratings and Reviews


Awesome server I play

This is a great app for all you math lovers. And for you non math lovers there are functions that are amazing. You can even make codes that are impossible to crack! Great app

Great Addition!!!

Wanting the app

Has everything I have been searching for!!!

Half of the theories and mathematical encryptions are in-app purchases. But can be easily restored on your devices after purchase.

Customer Support is quick and friendly.

It has everything you will look for; from modular arithmetic to RSA encryption.



I love this app so useful I highly recommend it


Ferra Solutions (Pty) Ltd
5.2 MB
Requires iOS 8.0 or later. Compatible with iPhone, iPad, and iPod touch.
Age Rating
Rated 4+
© 2016 Ferra Solutions (Pty) Ltd
In-App Purchases
  1. Combo Power I $4.99
  2. Crypt Power I $2.99
  3. Theory Power I $2.99


  • Family Sharing

    With Family Sharing set up, up to six family members can use this app.

More By This Developer

You May Also Like