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.

A208895 Number of non-congruent solutions to x^2 + y^2 + z^2 + t^2 == 1 (mod n).

Original entry on oeis.org

1, 8, 24, 64, 120, 192, 336, 512, 648, 960, 1320, 1536, 2184, 2688, 2880, 4096, 4896, 5184, 6840, 7680, 8064, 10560, 12144, 12288, 15000, 17472, 17496, 21504, 24360, 23040, 29760, 32768, 31680, 39168, 40320, 41472, 50616, 54720, 52416, 61440, 68880, 64512
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A208895 := proc(n)
        local a,pe,p,nu ;
        a := 1 ;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            nu := op(2,pe) ;
            if p > 2 then
                a := a*p^(3*nu)*(1-1/p^2) ;
            else
                a := a*8^nu ;
            end if;
        end do:
        a ;
    end proc:
    seq(A208895(n),n=1..20) ; # R. J. Mathar, Jun 23 2018
  • Mathematica
    a[n_] := Length[Union[Flatten[Table[If[Mod[x^2 + y^2 + z^2 + t^2, n] == 1, {x, y, z, t}], {x, n}, {y, n}, {z, n}, {t, n}], 3]]] - 1; Join[{1}, Table[a[n], {n, 2, 30}]]
    f[p_, e_] := p^(3*e) * (1-1/p^2); f[2, e_] := 8^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* Amiram Eldar, Oct 18 2022 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] == 2, 8^f[i,2], f[i,1]^(3*f[i,2]) * (1 - 1/f[i,1]^2))); } \\ Amiram Eldar, Oct 18 2022

Formula

Conjecture: a(n) = n*Sum_{d|2*n} d^2*mu(2*n/d)/3. - Gionata Neri, Feb 18 2018
From Amiram Eldar, Oct 18 2022: (Start)
Multiplicative with a(p^e) = p^(3*e)*(1-1/p^2) if p > 2, and a(2^e) = 8^e.
Sum_{k=1..n} a(k) ~ c * n^4 + O(n^3), where c = 2/(7*zeta(3)) = 0.237687... (Tóth, 2014). (End)