tìm số nguyên dương n sao cho n3+2019n là số chính phương
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
How to solve in the set positive integer the equation n^3 + 2019 n = k^2?
bạn vào thống kê hỏi đáp mình xem link nhé
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long a[1000006];
long long n;
int main()
{
for(int i=1;i<=1000006;i++){
a[i]=i*i;
}
cin>>n;
for(int i=1;i<=n;i++){
if(a[i]%n==0){cout<<a[i]/n;break;}
}
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
\(n^2+3n=k^2\)
\(\Leftrightarrow4n^2+12n=4k^2\)
\(\Leftrightarrow\left(2n+3\right)^2-9=\left(2k\right)^2\)
\(\Leftrightarrow\left(2n+3\right)^2-\left(2k\right)^2=9\)
\(\Leftrightarrow\left(2n-2k+3\right)\left(2n+2k+3\right)=9\)
Phương trình ước số cơ bản
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
Đặt \(p^n+144=a^2\left(a\in N\right)\)
\(\Rightarrow p^n=\left(a-12\right)\left(a+12\right)\)
Ta thấy : \(a-12+a+12=2a⋮2\)
\(\Rightarrow\left(a-12\right)\left(a+12\right)⋮2\)
\(\Rightarrow p^n⋮2\) mà $p$ nguyên tố \(\Rightarrow p=2\)
Khi đó ta có : \(2^n=\left(a-12\right)\left(a+12\right)\)
\(\Rightarrow\left\{{}\begin{matrix}2^x=a-12\\2^y=a+12\end{matrix}\right.\) với $x+y=a; x,y \in N$, \(y>x\)
\(\Rightarrow2^y-2^x=24\Rightarrow2^x\left(2^{y-x}-1\right)=24\)
Rồi bạn xét các TH để tìm ra giá trị đề bài nhé! Đến đây dễ rồi.
Bạn có thể tham khảo link này ( mình lấy bên diendantoanhoc )
How to solve in the set positive integer the equation n^3 + 2019 n = k^2?