Prime Number Web App - Usage

You too can include the next prime number on your webpage! This is how you do it.

Return Value

All of the endpoints here return the same structure. You'll get back a JSON structure with the following keys.

Number (string)
The number you requested.
Prime (bool)
This will be true if your number is prime. Congratulations!
Happy (bool)
This will be true if you submitted a happy number. Even better if it's prime and happy! This probably calls for celebration.
Count (int)
The number of times this number has been requested, if prime. We don't track non-primes, so in that case this will always be 0 or 1.

Prime Number Test

Send a request to http://sigma-crow-364.appspot.com/prime with the following parameters:

number (required)
A number less than 300 digits whose primality you'd like to test.

The Next Prime Number

When this application launches, or maybe just every once in a while, it starts marching through the infinite list of prime numbers. This makes you part of the march. Hit this endpoint and you'll get the next prime number in the series.

Send a request to http://sigma-crow-364.appspot.com/nextprime with no parameters to get the next in the list.