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