Jimp Numbers
Time limit2sMemory limit512 MB
Count the jimp numbers k up to n, where exactly one arithmetic triple (a, b, c) satisfies a^2 + b^2 + k = c^2.
- Level
Hard8 of 10
- Topics
- Number theory, Math
- Solved
- No attempts yet
Problem
A positive integer is called a jimp number if there is exactly one triple of positive integers such that , , and are consecutive terms of an arithmetic progression, in that order, and .
Count the jimp numbers that are not greater than the given number .
Input
The only line contains a single integer ().
Output
Print a single integer: the number of jimp numbers not greater than .