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.

A238534 Number of solutions to gcd(u^2 + v^2 + w^2 + x^2 + y^2 + z^2, n) = 1 with u, v, w, x, y, z in [0,n-1].

Original entry on oeis.org

1, 32, 504, 2048, 12400, 16128, 101136, 131072, 367416, 396800, 1611720, 1032192, 4453488, 3236352, 6249600, 8388608, 22713088, 11757312, 44576280, 25395200, 50972544, 51575040, 141611184, 66060288, 193750000, 142511616, 267846264, 207126528, 574288624
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local i, j, k, S1, S2,  S4,  S6,G;
      G:= select(t -> igcd(t,n)=1, [$1..n-1]);
      S1:= Array(0..n-1);
      for i from 0 to n-1 do j:= i^2 mod n; S1[j]:= S1[j]+1; od;
      S2:= Array(0..n-1);
      for i from 0 to n-1 do
        for j from 0 to n-1 do
          k:= i^2 + j mod n;
          S2[k]:= S2[k]+S1[j];
      od od:
      S4:= Array(0..n-1);
      for i from 0 to n-1 do
        for j from 0 to n-1 do
          k:= i + j mod n;
          S4[k]:= S4[k]+S2[i]*S2[j];
      od od:
      S6:= Array(0..n-1);
      for i from 0 to n-1 do
        for j from 0 to n-1 do
          k:= i + j mod n;
          S6[k]:= S6[k]+S4[i]*S2[j];
      od od:
      add(S6[i],i=G);
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Mar 05 2018
  • Mathematica
    g[n_, 6] := g[n, 6] = Sum[If[GCD[u^2+v^2+w^2+x^2+y^2+z^2, n] == 1, 1, 0], {u, n}, {v, n}, {w, n}, {x, n}, {y, n}, {z, n}]; Table[g[n, 6], {n, 1, 12}]
    f[p_, e_] := (p - 1)*p^(6*e - 4)*(p^3 - (-1)^(3*(p - 1)/2)); f[2, e_] := 2^(6*e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 30] (* Amiram Eldar, Sep 07 2023 *)
  • PARI
    a(n)={my(p=lift(Mod(sum(i=0, n-1, x^(i^2%n)), x^n-1)^6)); sum(i=0, n-1, if(gcd(i,n)==1, polcoeff(p,i)))} \\ Andrew Howroyd, Aug 06 2018
    
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my([p,e]=f[i,]); if(p==2, 2^(6*e-1), (p - 1)*p^(6*e - 4)*(p^3 - (-1)^(3*(p-1)/2))))} \\ Andrew Howroyd, Aug 07 2018

Formula

Multiplicative with a(2^e) = 2^(6*e-1), a(p^e) = (p - 1)*p^(6*e - 4)*(p^3 - (-1)^(3*(p-1)/2)) for odd prime p. - Andrew Howroyd, Aug 07 2018
From Amiram Eldar, Feb 13 2024: (Start)
Dirichlet g.f.: zeta(s-6) * (1 - 1/2^(s-5)) * Product_{p prime > 2} (1 - 1/p^(s-5) - (-1)^(3*(p-1)/2)*(p-1)/p^(s-2)).
Sum_{k=1..n} a(k) = c * n^7 + O(n^6 * log(n)), where c = (3/28) * Product_{p prime == 1 (mod 4)} (1 - 1/p^2 - 1/p^4 + 1/p^5) * Product_{p prime == 3 (mod 4)} (1 - 1/p^2 + 1/p^4 - 1/p^5) = 0.08756841635... (Calderón et al., 2015). (End)

Extensions

a(16)-a(29) from Giovanni Resta, Mar 05 2014