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.

User: Param Mayurkumar Parekh

Param Mayurkumar Parekh's wiki page.

Param Mayurkumar Parekh has authored 2 sequences.

A360323 a(n) is the number of solutions to gcd(a^2 + b^2, p) = 1 where p is the n-th prime and 0 <= a,b <= p-1.

Original entry on oeis.org

2, 8, 16, 48, 120, 144, 256, 360, 528, 784, 960, 1296, 1600, 1848, 2208, 2704, 3480, 3600, 4488, 5040, 5184, 6240, 6888, 7744, 9216, 10000, 10608, 11448, 11664, 12544, 16128, 17160, 18496, 19320, 21904, 22800, 24336, 26568, 27888, 29584, 32040, 32400, 36480
Offset: 1

Keywords

Comments

The prime numbers can be divided into 3 classes as follows, where 0 <= a,b <= p-1.
1. p = 2: The solutions are (0,1), (1,0).
2. p == 1 (mod 4): The number of solutions = p^2 - (number of solutions to a^2 + b^2 == 0 (mod p)). These primes can be written as the sum of two squares, so p = a^2 + b^2 == 0 (mod p). Hence, the number of possible values of (a,b) such that a^2 + b^2 == 0 (mod p) is 2*p - 1, so the final answer is p^2 - (2*p - 1) = (p-1)^2.
3. p == 3 (mod 4): These primes can't be written as the sum of two squares, so the number of possible values of (a,b) such that a^2 + b^2 == 0 (mod p) is 1 (that is, (0,0) only). Hence, the number of solutions for this case is p^2 - 1.

Examples

			a(2) = A079458(A000040(2)) = A079458(3) = 8.
		

Crossrefs

Formula

a(n) = A079458(A000040(n)).

A358714 a(n) = phi(n)^3.

Original entry on oeis.org

1, 1, 8, 8, 64, 8, 216, 64, 216, 64, 1000, 64, 1728, 216, 512, 512, 4096, 216, 5832, 512, 1728, 1000, 10648, 512, 8000, 1728, 5832, 1728, 21952, 512, 27000, 4096, 8000, 4096, 13824, 1728, 46656, 5832, 13824, 4096, 64000, 1728, 74088, 8000, 13824, 10648, 97336, 4096, 74088
Offset: 1

Keywords

Comments

Number of solutions to gcd(x*y*z, n) = 1 such that 0 <= x,y,z <= n-1.
x*y*z == t (mod n) where t is a unit (invertible element) in Z_n. Since t is a unit, all x,y,z must be units. Here there are A000010(n) possibilities for each x,y,z so there are a total of A000010(n)^3 ways to get t as a unit.

Examples

			a(9) = A000010(9)^3 = 216.
		

Crossrefs

Programs

  • Magma
    [(EulerPhi(n))^3: n in [1..180]];
    
  • Mathematica
    a[n_] := EulerPhi[n]^3; Array[a, 100] (* Amiram Eldar, Jan 06 2023 *)
  • PARI
    a(n) = eulerphi(n)^3;

Formula

a(n) = A000010(n)^3.
From Amiram Eldar, Jan 06 2023: (Start)
Multiplicative with a(p^e) = (p-1)^3*p^(3*e-3).
Sum_{k=1..n} a(k) ~ c * n^4, where c = (1/4) * Product_{p prime}(1 - 3/p^2 + 3/p^3 - 1/p^4) = 0.08429696844... .
Sum_{k>=1} 1/a(k) = Product_{p prime} (1 + p^3/((p-1)^3*(p^3-1))) = 2.47619474816... (A335818). (End)