Generalization of Catalan's conjecture

조회 수: 2 (최근 30일)
Jesús Zambrano
Jesús Zambrano 2020년 3월 29일
댓글: Jesús Zambrano 2020년 4월 3일
I would like to have a simple MATLAB code that can give the solutions for the generalization of the Catalan's conjecture for a given n.
This conjecture and the generalization can be found in the following link
The link includes a table with the solutions I would like to get with a code.

채택된 답변

Athul Prakash
Athul Prakash 2020년 4월 3일
You may explore File Exchange for solutions or related code from which you can build your own solution.
If you are attempting to come up with your own algorithm, have a look at 'factorIntegerPower'
You can use that to find all the perfect powers in a given sequence of numbers as follows:
a = 1:100;
b = findIntegerPower(a);
result = a(a~=b); % +result is a row vector containing all the perfect powers in the given range.
This can be a starting point for your solution.
Hope it helps!
  댓글 수: 1
Jesús Zambrano
Jesús Zambrano 2020년 4월 3일
Thanks, Athul!
That is a good start but still a long way to go.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by