foo_daemon
- 8
- 0
Hi,
I have a problem that I'm a bit stuck on, and need some direction:
I need to find \forall_n within a certain domain that can satisfy this equation:
\left( 3n-1 \right) \left( n+1 \right) = m^{2} where m,n \in \mathbb{Z}
Or, to put it in a different context, I'm looking for discrete values of n (within a certain domain) such that \sqrt{ \left( 3n - 1 \right) \left( n + 1 \right) } is an integer.
I know I can just do an iterative search over \forall_n in the domain, but shouldn't there be a faster, easier way using some number theory?
If 3n - 1 and n + 1 are both perfect squares, then it is true, but it is also true if their product is a perfect square (e.g. n=17 ). I'm just not sure how to piece all the conditions together into a coherent algorithm.
I have a problem that I'm a bit stuck on, and need some direction:
I need to find \forall_n within a certain domain that can satisfy this equation:
\left( 3n-1 \right) \left( n+1 \right) = m^{2} where m,n \in \mathbb{Z}
Or, to put it in a different context, I'm looking for discrete values of n (within a certain domain) such that \sqrt{ \left( 3n - 1 \right) \left( n + 1 \right) } is an integer.
I know I can just do an iterative search over \forall_n in the domain, but shouldn't there be a faster, easier way using some number theory?
If 3n - 1 and n + 1 are both perfect squares, then it is true, but it is also true if their product is a perfect square (e.g. n=17 ). I'm just not sure how to piece all the conditions together into a coherent algorithm.
Last edited: