Calculators
Sunny Number Calculator
Check whether adding one to an integer gives a perfect square with exact sunny number arithmetic, privately in your browser.
A sunny number becomes a perfect square when you add one. For example, 8 + 1 = 9 = 3 squared. Zero qualifies under this definition. Enter up to 1000 digits; leading zeros are removed. Calculations stay in your browser.
How to check a sunny number
A sunny number is a nonnegative integer n for which n + 1 is a perfect square. Equivalently, n = k squared minus 1 for a positive integer k. Examples are 0, 3, 8, 15, 24 and 35. For 8, adding one gives 9 = 3 squared, so it qualifies. For 9, adding one gives 10, whose integer square root is 3 with remainder 1, so it does not qualify. This calculator includes zero because 0 + 1 = 1 squared. Enter 1 to 1000 decimal digits without signs, separators, decimals or exponent notation. Surrounding whitespace is accepted and leading zeros are removed. Exact BigInt arithmetic and an integer Newton iteration find the floor square root of n + 1 without floating-point rounding. A zero remainder confirms a perfect square. This checks a single integer and does not search a range. All calculations stay in your browser.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
What is a sunny number?
An integer n for which n + 1 is a perfect square. For example, 15 + 1 = 16 = 4 squared, so 15 is a sunny number.
Does zero qualify?
Yes under the nonnegative definition used here: 0 + 1 = 1 squared. If a sequence lists only positive sunny numbers, it starts at 3.
What does the remainder mean?
It is n + 1 minus the square of its integer square root. A zero remainder means n + 1 is a perfect square and n is sunny.
Are large integers exact?
Yes. Up to 1000 input digits are accepted and processed with exact integer arithmetic. Leading zeros are removed and no input leaves your browser.