# Integer Values of a Function

#### drosser

Is there a quick way to find integer values of x that give integer values for y?

(x^2-R)/(P-2x)=y

sqrt(R) rounded down<x<P/2

an equivalent equation is

x^2+Px+R=y y= a perfect square

sqrt(x^2+Px+R)= integer

P and R are integer values. They are very large.
P=1.720901664588208977632751606930114527882871349707453690712637328347852193783039275682367157744911327176901e+106

R=1.611966555644167779663503662738501807226651661942209780569274299995114404468640924608971613224013135298666e+105

Maybe a generalized equation or a program?

#### fresh_42

Mentor
2018 Award
You could search for it in a brute force approach. Otherwise we probably need more information about $P,R$, e.g. if $P^2-4R$ is a square in which case we have Pythagorean triplets as solutions, or the prime factor decomposition of them.

### Want to reply to this thread?

"Integer Values of a Function"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving