OFFSET
1,4
COMMENTS
In what follows, i = sqrt(-1). This sequence is the canonical generalization of the reduced totient function to imaginary quadratic field Q(i). For Gaussian integers alpha = a + b*i = A229140(n) + A385236(n)*i the exponent lambda(alpha),- the least integer k such that beta^k == 1 (mod alpha) for all beta coprime with alpha,- is computed by factoring norm N_alpha = a^2 + b^2 = A001481(n) into rational primes and intersecting
(1) for ramified prime 2: exponent lambda(2^k) = 2^(k-1) if k is 3, 2^[k/2] if k is 1,2,4 or 5, and 2^([k/2]-1) for k >= 6,
(2) inert primes p = 4n + 3: lambda(p^k) = p^(k+1) - p^(k-1),
(3) split primes q = 4n + 1: lambda(q^k) = q^k - q^(k-1),
with k the multiplicity of each prime element in alpha. That is, apply the cyclic subgroup structure for irreducible elements in quadratic ring Z[i] as summarized in Lassak and Porubsky, p. 277-279. The rational and quadratic exponents then differ for 25 of the 87 Gaussian integers A229140(n) + A385236(n)*i.
LINKS
Miroslav Lassak and Stefan Porubsky, Fermat-Euler theorem in algebraic number fields, Journal of Number Theory, Vol. 60, Issue 2 (1996), pp. 254-290.
EXAMPLE
PROG
(PARI) a(n) = {my(Qi = bnfinit(t^2+1)); print1("0, ");
for(n=1, 173, my(f = bnfisintnorm(Qi, n));
if(f, my(v, a=-1, b); until(issquare(n-a*a, &b), a++);
v = idealstar(Qi, [a, b]~, 0)[2];
print1(if(v, v[1], 1), ", ")))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sjoerd J. Schaper, Nov 29 2025
STATUS
approved
