cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A103222 Real part of the totient function phi(n) for Gaussian integers. See A103223 for the imaginary part and A103224 for the norm.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 6, 4, 6, 0, 10, 4, 8, 6, 4, 8, 12, 6, 18, 0, 12, 10, 22, 8, 10, 4, 18, 12, 22, 0, 30, 16, 20, 8, 12, 12, 30, 18, 16, 0, 32, 12, 42, 20, 12, 22, 46, 16, 42, 0, 24, 8, 44, 18, 20, 24, 36, 16, 58, 0, 50, 30, 36, 32, 8, 20, 66, 16, 44, 0, 70, 24, 62, 24, 20, 36, 60, 8, 78, 0
Offset: 1

Views

Author

T. D. Noe, Jan 26 2005

Keywords

Comments

This definition of the totient function for Gaussian integers preserves many of the properties of the usual totient function: (1) it is multiplicative: if gcd(z1,z2)=1, then phi(z1*z2)=phi(z1)*phi(z2), (2) phi(z^2)=z*phi(z), (3) z=Sum_{d|z} phi(d) for properly selected divisors d and (4) the congruence z=1 (mod phi(z)) appears to be true only for Gaussian primes. The first negative term occurs for n=130=2*5*13, the product of the first three primes which are not Gaussian primes.

Crossrefs

Programs

  • Mathematica
    phi[z_] := Module[{f, k, prod}, If[Abs[z]==1, z, f=FactorInteger[z, GaussianIntegers->True]; If[Abs[f[[1, 1]]]==1, k=2; prod=f[[1, 1]], k=1; prod=1]; Do[prod=prod*(f[[i, 1]]-1)f[[i, 1]]^(f[[i, 2]]-1), {i, k, Length[f]}]; prod]]; Re[Table[phi[n], {n, 100}]]

Formula

Let a nonzero Gaussian integer z have the factorization u p1^e1...pn^en, where u is a unit (1, i, -1, -i), the pk are Gaussian primes in the first quadrant and the ek positive integers. Then we define phi(z) = u*product_{k=1..n} (pk-1) pk^(ek-1).

A103224 Norm of the totient function phi(n) for Gaussian integers. See A103222 and A103223 for the real and imaginary parts.

Original entry on oeis.org

1, 2, 4, 8, 8, 8, 36, 32, 36, 16, 100, 32, 80, 72, 32, 128, 160, 72, 324, 64, 144, 200, 484, 128, 200, 160, 324, 288, 520, 64, 900, 512, 400, 320, 288, 288, 936, 648, 320, 256, 1088, 288, 1764, 800, 288, 968, 2116, 512, 1764, 400, 640, 640, 2000, 648, 800, 1152
Offset: 1

Views

Author

T. D. Noe, Jan 26 2005

Keywords

Comments

See A103222 for definitions.
Multiplicative because the totient function on Gaussian integers is multiplicative and the norm is completely multiplicative. - Andrew Howroyd, Aug 03 2018

Crossrefs

Programs

  • Mathematica
    phi[z_] := Module[{f, k, prod}, If[Abs[z]==1, z, f=FactorInteger[z, GaussianIntegers->True]; If[Abs[f[[1, 1]]]==1, k=2; prod=f[[1, 1]], k=1; prod=1]; Do[prod=prod*(f[[i, 1]]-1)f[[i, 1]]^(f[[i, 2]]-1), {i, k, Length[f]}]; prod]]; Abs[Table[phi[n], {n, 100}]]^2
  • PARI
    \\ See A103222
    CEulerPhi(z)={my(f=factor(z,I)); prod(i=1, #f~, my([p,e]=f[i,]); if(norm(p)==1, p^e, (p-1)*p^(e-1)))}
    a(n)=norm(CEulerPhi(n)); \\ Andrew Howroyd, Aug 03 2018

Formula

a(n) = A103222(n)^2 + A103223(n)^2. - Andrew Howroyd, Aug 03 2018

A332316 Numbers k such that k and k + 1 have the same value of the norm of the totient function for Gaussian integers (A103224).

Original entry on oeis.org

4, 5, 35, 51, 154, 804, 3596, 6200, 7595, 916538, 1638039, 2794805, 6804035, 24724472, 40128444, 52424787, 69918849, 82954611, 124077316, 160245605, 204215514, 361275551, 371254235, 661831521, 1314759754, 1695554762, 2246110022, 2378746131, 2889320799, 4181707719
Offset: 1

Views

Author

Amiram Eldar, Feb 09 2020

Keywords

Comments

The corresponding common values A103224(k) = A103224(k+1) are 8, 8, 288, 640, 7200, 139392, 3744000, 5760000, ...

Examples

			4 is a term since norm(phi(4)) = norm(phi(5)) = 8.
		

Crossrefs

Programs

  • Mathematica
    phi[z_] := Module[{f, k, prod}, If[Abs[z]==1, z, f = FactorInteger[z, GaussianIntegers->True]; If[Abs[f[[1, 1]]]==1, k=2; prod=f[[1, 1]], k=1; prod=1]; Do[prod=prod*(f[[i, 1]]-1)f[[i, 1]]^(f[[i, 2]]-1), {i, k, Length[f]}]; prod]]; Select[Range[10^3], Abs[phi[#]]^2 == Abs[phi[# + 1]]^2 &] (* after T. D. Noe at A103222 *)

A103225 Number of Gaussian integers z with abs(z) < n and gcd(n,z)=1.

Original entry on oeis.org

1, 4, 24, 24, 44, 48, 144, 96, 224, 96, 372, 192, 444, 304, 404, 392, 792, 448, 1124, 408, 1200, 752, 1648, 808, 1240, 896, 2036, 1200, 2440, 800, 2996, 1600, 3008, 1592, 2404, 1808, 4056, 2256, 3616, 1600, 4992, 2400, 5784, 3008, 3604, 3304, 6916, 3224, 7376
Offset: 1

Views

Author

T. D. Noe, Jan 26 2005

Keywords

Comments

This sequence is much like the usual totient function. That is, it gives the number of Gaussian integers that are relatively prime to n and whose modulus is less than n. When n is a Gaussian prime, A002145, then a(n) = A051132(n)-1.
Four of the dominant lines of the plot appear to align to k(i)*Pi*n^2, with k(i) = 1, 8/9, 1/2, and 4/9. Conjecture: a(n) < Pi*n^2. - Bill McEachen, Aug 14 2025

Examples

			a(2)=4 because 1, -1, i and -i are relatively prime to 2 and have modulus less than 2.
		

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[z=a+ b*I; If[Abs[z]
    				
Showing 1-4 of 4 results.