/v1/totient
Euler totient
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
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_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"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
}