Euler totient function of number
이전 댓글 표시
I want to calculate Euler totient function for a number N. Euler function should give me an array of integers that are relatively prime to N. Let N=6 then Euler totient function should give a vector [1,2,4,5,7,8]. There are many user defined functions written by people but they all just count the numbers relatively prime to N. How can I get such a vector? Is there any MATLAB builtin command for Euler Totient function?
댓글 수: 2
Walter Roberson
2017년 6월 3일
Why is 1 considered relatively prime to 6? 6/1 is an integer.
David Goodmanson
2017년 6월 3일
Hi Walter, it's because the greatest common divisor of those two is 1.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Just for fun에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!