crypto.euler_totient
Calculate Euler's totient and prime factorization for an integer up to 10^14; returns φ(n) as a string and a prime-to-exponent map, rejecting inputs beyond the limit.
Instructions
오일러 토션트 φ(n) = n * Π(1 - 1/p) 를 구한다. n 은 1 이상 10^14 이하의 정수 문자열이며 시행 나눗셈으로 소인수분해하므로 한도를 넘으면 오류다. phi 는 정수 문자열, factorization 은 소수 문자열을 지수에 대응시킨 맵이다. RSA 크기의 수에는 쓸 수 없다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phi | Yes | ||
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| factorization | Yes |