/v1/totient
Euler totient
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
curl "https://api.oanor.com/modular-api/v1/totient" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/modular-api/v1/totient", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/modular-api/v1/totient");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/modular-api/v1/totient",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"note": "Euler's totient φ(n) counts the integers in 1..n coprime to n. For gcd(a,n)=1, a^φ(n) ≡ 1 (mod n) (Euler's theorem).",
"inputs": {
"n": "36"
},
"totient": "12",
"euler_check": {
"a": "5",
"coprime": true,
"a_pow_phi_mod_n": "1"
},
"prime_factorization": [
{
"prime": "2",
"exponent": 2
},
{
"prime": "3",
"exponent": 2
}
]
},
"meta": {
"timestamp": "2026-06-04T18:38:00.695Z",
"request_id": "9390e275-8e49-4442-b060-1ebaceefb5dc"
},
"status": "ok",
"message": "Euler totient",
"success": true
}