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-10 of 11 results. Next

A060968 Number of solutions to x^2 + y^2 == 1 (mod n).

Original entry on oeis.org

1, 2, 4, 8, 4, 8, 8, 16, 12, 8, 12, 32, 12, 16, 16, 32, 16, 24, 20, 32, 32, 24, 24, 64, 20, 24, 36, 64, 28, 32, 32, 64, 48, 32, 32, 96, 36, 40, 48, 64, 40, 64, 44, 96, 48, 48, 48, 128, 56, 40, 64, 96, 52, 72, 48, 128, 80, 56, 60, 128, 60, 64, 96, 128, 48, 96, 68, 128, 96, 64, 72
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), May 09 2001

Keywords

Comments

From Jianing Song, Nov 05 2019: (Start)
a(n) is also the order of the group SO(2,Z_n), i.e., the group of 2 X 2 matrices A over Z_n such that A*A^T = E = [1,0;0,1] and det(A) = 1. Elements in SO(2,Z_n) are of the form [x,y;-y,x] where x^2+y^2 == 1 (mod n). For example, SO(2,Z_4) = {[1,0;0,1], [0,1;3,0], [1,2;2,1], [2,1;3,2], [3,0;0,3], [0,3;1,0], [3,2;2,3], [2,3;1,2]}. Note that SO(2,Z_n) is abelian, and it is isomorphic to the multiplicative group G_n := {x+yi: x^2 + y^2 = 1, x,y in Z_n} where i = sqrt(-1), by the mapping [x,y;-y,x] <-> x+yi. See my link below for the group structure of SO(2,Z_n).
The exponent of SO(2,Z_n) (i.e., least e > 0 such that x^e = E for every x in SO(2,Z_n)) is given by A235863(n).
The rank of SO(2,Z_n) (i.e., the minimum number of generators) is omega(n) if n is not divisible by 4, omega(n)+1 if n is divisible by 4 but not by 8 and omega(n)+2 if n is divisible by 8, omega = A001221. (End)
In general, let R be any commutative ring with unity, O(m,R) be the group of m X m matrices A over R such that A*A^T = E and SO(m,R) be the group of m X m matrices A over R such that A*A^T = E and det(A) = 1, then O(m,R)/SO(m,R) = {square roots of unity in R*}, where R* is the multiplicative group of R. This is because if we define f(M) = det(M) for M in O(m,R), then f is a surjective homomorphism from O(m,R) to {square roots of unity in R*}, and SO(m,R) is its kernel. See also A182039. - Jianing Song, Nov 08 2019

Examples

			a(3) = 4 because the 4 solutions are (0,1), (0,2), (1,0), (2,0).
		

Crossrefs

Programs

  • Haskell
    a060968 1 = 1
    a060968 n = (if p == 2 then (if e == 1 then 2 else 2^(e+1)) else 1) *
       (product $ zipWith (*) (map (\q -> q - 2 + mod q 4) ps'')
                              (zipWith (^) ps'' (map (subtract 1) es'')))
       where (ps'', es'') = if p == 2 then (ps, es) else (ps', es')
             ps'@(p:ps) = a027748_row n; es'@(e:es) = a124010_row n
    -- Reinhard Zumkeller, Aug 05 2014
  • Mathematica
    fa=FactorInteger; phi[p_,s_] := Which[Mod[p,4] == 1, p^(s-1)*(p-1), Mod[p,4]==3, p^(s-1)*(p+1), s==1, 2, True, 2^(s+1)]; phi[1]=1; phi[n_] := Product[phi[fa[n][[i,1]], fa[n][[i,2]]], {i, Length[fa[n]]}]; Table[phi[n], {n,1,100}]
  • PARI
    a(n)=my(f=factor(n)[,1]);n*prod(i=if(n%2,1,2),#f,if(f[i]%4==1, 1-1/f[i], 1+1/f[i]))*if(n%4,1,2) \\ Charles R Greathouse IV, Apr 16 2012
    

Formula

Multiplicative, with a(2^e) = 2 if e = 1 or 2^(e+1) if e > 1, a(p^e) = (p-1)*p^(e-1) if p == 1 (mod 4), a(p^e) = (p+1)*p^(e-1) if p == 3 (mod 4). - David W. Wilson, Jun 19 2001
a(n) = n * (Product_{prime p|n, p == 1 (mod 4)} (1 - 1/p)) * (Product_{prime p|n, p == 3 (mod 4)} (1 + 1/p)) * (1 + [4|n]) where "[ ]" is the Iverson bracket. - Ola Veshta (olaveshta(AT)my-deja.com), May 18 2001
a(n) = A182039(n)/A060594(n). - Jianing Song, Nov 08 2019
Sum_{k=1..n} a(k) ~ c * n^2 + O(n*log(n)), where c = 5/(8*G) = 0.682340..., where G is Catalan's constant (A006752) (Tóth, 2014). - Amiram Eldar, Oct 18 2022

A227499 Number of the Lipschitz quaternions in a reduced system modulo n.

Original entry on oeis.org

1, 8, 48, 128, 480, 384, 2016, 2048, 3888, 3840, 13200, 6144, 26208, 16128, 23040, 32768, 78336, 31104, 123120, 61440, 96768, 105600, 267168, 98304, 300000, 209664, 314928, 258048, 682080, 184320, 892800, 524288, 633600, 626688, 967680, 497664, 1822176
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    cuater[n_] := Flatten[Table[{a, b,c,d},{a, n}, {b, n}, {c, n}, {d, n}], 3]; a[n_] := Length@Select[cuater[n], GCD[#.#, n] == 1 &]; Array[a,20]
    f[p_, e_] := (p-1)*p^(4*e-1) * If[p == 2, 1, 1 - 1/p^2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 13 2024 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i,1]; e = f[i, 2]; (p-1)*p^(4*e-1) * if(p == 2, 1, 1 - 1/p^2));} \\ Amiram Eldar, Feb 13 2024

Formula

Multiplicative: a(2^s) = 2^(4s-1); a(3^s) = 16*3^(4s-3); a(5^s) = 32*3*5^(4s-3).
From Amiram Eldar, Feb 13 2024: (Start)
Multiplicative with a(2^e) = 2^(4*e-1), and a(p^e) = p^(4*e-3) * (p-1)^2 * (p+1) for an odd prime p.
Dirichlet g.f.: zeta(s-4) * (1 - 1/2^(s-3)) * Product_{p prime > 2} (1 - 1/p^(s-3) - (p-1)/p^(s-1)).
Sum_{k=1..n} a(k) = (12/55) * c * n^5 + O(n^4 * log(n)), where c = Product_{p prime} (1 - 1/p^2 - 1/p^3 + 1/p^4) = 0.53589615382833799980... (Calderón et al., 2015).
Sum_{n>=1} 1/a(n) = (17*Pi^8/57240) * Product_{p prime} (1 - 2/p^2 + 1/p^4 + 1/p^5 + 2/p^6 - 1/p^8) = 1.16039588611967540703... . (End)

A071302 a(n) = (1/2) * (number of n X n 0..2 matrices M with MM' mod 3 = I, where M' is the transpose of M and I is the n X n identity matrix).

Original entry on oeis.org

1, 4, 24, 576, 51840, 13063680, 9170703360, 19808719257600, 131569513308979200, 2600339861038664908800, 152915585868239728626892800, 27051378802435080953011843891200, 14395932257291877030764312963579904000
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2002

Keywords

Comments

Also, number of n X n orthogonal matrices over GF(3) with determinant 1. - Max Alekseyev, Nov 06 2022

Examples

			From _Petros Hadjicostas_, Dec 17 2019: (Start)
For n = 2, the 2*a(2) = 8 n X n matrices M with elements in {0, 1, 2} that satisfy MM' mod 3 = I are the following:
(a) With 1 = det(M) mod 3:
[[1,0],[0,1]];  [[0,1],[2,0]]; [[0,2],[1,0]]; [[2,0],[0,2]].
This is the abelian group SO(2, Z_3). See the comments for sequence A060968.
(b) With 2 = det(M) mod 3:
[[0,1],[1,0]];  [[0,2],[2,0]]; [[1,0],[0,2]]; [[2,0],[0,1]].
Note that, for n = 3, we have 2*a(3) = 2*24 = 48 = A264083(3). (End)
		

Crossrefs

Programs

  • Mathematica
    FoldList[Times, 1, LinearRecurrence[{3, -3, 9}, {4, 6, 24}, 12]] (* Amiram Eldar, Jun 22 2025 *)
  • PARI
    { a071302(n) = my(t=n\2); prod(i=0,t-1,3^(2*t)-3^(2*i)) * if(n%2,3^t,1/(3^t+(-1)^t)); } \\ Max Alekseyev, Nov 06 2022

Formula

a(2k+1) = 3^k * Product_{i=0..k-1} (3^(2k) - 3^(2i)); a(2k) = (3^k + (-1)^(k+1)) * Product_{i=1..k-1} (3^(2k) - 3^(2i)) (see MacWilliams, 1969). - Max Alekseyev, Nov 06 2022
a(n+1) = a(n) * A318609(n+1) for n >= 1. - conjectured by Petros Hadjicostas, Dec 18 2019; proved based on the explicit formula by Max Alekseyev, Nov 06 2022

Extensions

Terms a(8) onward from Max Alekseyev, Nov 06 2022

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)

A071303 1/2 times the number of n X n 0..3 matrices M with MM' mod 4 = I, where M' is the transpose of M and I is the n X n identity matrix.

Original entry on oeis.org

1, 8, 192, 12288, 1966080, 1509949440, 5411658792960
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2002

Keywords

Comments

It seems that a(n) = n! * 2^(binomial(n+1,2) - 1) for n = 1, 2, 3, 4, 5, while for n = 6, a(n) is twice this number. The number n! * 2^(binomial(n+1,2) - 1) appears in Proposition 6.1 in Eriksson and Linusson (2000) as an upper bound to the number of three-dimensional permutation arrays of size n (see column k = 3 of A330490). - Petros Hadjicostas, Dec 16 2019
a(7) = 7! * 2^30. - Sean A. Irvine, Jul 11 2024

Examples

			From _Petros Hadjicostas_, Dec 16 2019: (Start)
For n = 2, here are the 2*a(2) = 16 2 x 2 matrices M with elements in {0,1,2,3} that satisfy MM'  mod 4 = I:
(a) With 1 = det(M) mod 4:
  [[1,0],[0,1]]; [[0,1],[3,0]]; [[0,3],[1,0]]; [[1,2],[2,1]];
  [[2,1],[3,2]]; [[2,3],[1,2]]; [[3,0],[0,3]]; [[3,2],[2,3]].
These form the abelian group SO(2, Z_n). See the comments for sequence A060968.
(b) With 3 = det(M) mod 4:
  [[0,1],[1,0]]; [[0,3],[3,0]]; [[1,0],[0,3]];  [[1,2],[2,3]];
  [[2,1],[1,2]]; [[2,3],[3,2]]; [[3,0],[0,1]];  [[3,2],[2,1]].
Note that, for n = 3, we have 2*a(3) = 2*192 = 384 = A264083(4). (End)
		

Crossrefs

Extensions

a(7) from Sean A. Irvine, Jul 11 2024

A071304 a(n) = (1/2) * (number of n X n 0..4 matrices M with MM' mod 5 = I, where M' is the transpose of M and I is the n X n identity matrix).

Original entry on oeis.org

1, 4, 120, 14400, 9360000, 29016000000, 457002000000000, 35646156000000000000, 13946558535000000000000000, 27230655539587500000000000000000, 266009466302345390625000000000000000000, 12987912192212013697265625000000000000000000000
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2002

Keywords

Comments

Also, number of n X n orthogonal matrices over GF(5) with determinant 1. - Max Alekseyev, Nov 06 2022

Examples

			From _Petros Hadjicostas_, Dec 17 2019: (Start)
For n = 2, the 2*a(2) = 8 n X n matrices M with elements in {0,1,2,3,4} that satisfy MM' mod 5 = I are the following:
(a) those with 1 = det(M) mod 5:
[[1,0],[0,1]]; [[0,4],[1,0]]; [[0,1],[4,0]]; [[4,0],[0,4]].
These form the abelian group SO(2, Z_5). See the comments for sequence A060968.
(b) those with 4 = det(M) mod 5:
[[0,1],[1,0]]; [[0,4],[4,0]]; [[1,0],[0,4]]; [[4,0],[0,1]].
Note that, for n = 3, we have 2*a(3) = 2*120 = 240 = A264083(5). (End)
		

Crossrefs

Programs

  • PARI
    { a071304(n) = my(t=n\2); prod(i=0, t-1, 5^(2*t)-5^(2*i)) * if(n%2, 5^t, 1/(5^t+1)); } \\ Max Alekseyev, Nov 06 2022

Formula

a(2k+1) = 5^k * Product_{i=0..k-1} (5^(2k) - 5^(2i)); a(2k) = (5^k - 1) * Product_{i=1..k-1} (5^(2k) - 5^(2i)) (see MacWilliams, 1969). - Max Alekseyev, Nov 06 2022
From Petros Hadjicostas, Dec 20 2019: (Start)
Let b(n) be the number of solutions to the equation Sum_{i = 1..n} x_i^2 = 1 (mod 5) with x_i in 0..4. We have that b(n) = 5*b(n-1) + 5*b(n-2) - 25*b(n-3) for n >= 3 with b(0) = 0, b(1) = 2, and b(2) = 4.
We have b(n) = A330607(n, k=1) for n >= 0.
We conjecture that a(n+1) = a(n)*b(n+1) for n >= 1. (End)

Extensions

Terms a(7) onward from Max Alekseyev, Nov 06 2022

A071306 a(n) = (1/2) * (number of n X n 0..6 matrices M with MM' mod 7 = I, where M' is the transpose of M and I is the n X n identity matrix).

Original entry on oeis.org

1, 8, 336, 112896, 276595200, 4662288691200, 546914437209907200, 450219964711195607040000, 2596509480922336727312302080000, 104784757384177668346109081238896640000, 29597339316082819652234687848790174733434880000
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2002

Keywords

Comments

Also, number of n X n orthogonal matrices over GF(7) with determinant 1. - Max Alekseyev, Nov 06 2022

Examples

			From _Petros Hadjicostas_, Dec 19 2019: (Start)
For n = 2, the 2*a(2) = 16 n X n matrices M with elements in 0..6 that satisfy MM' = I are the following:
(a) those with 1 = det(M) mod 7:
[[1,0],[0,1]]; [[0,1],[6,0]]; [[0,6],[1,0]]; [[2,2],[5,2]];
[[2,5],[2,2]]; [[5,2],[5,5]]; [[5,5],[2,5]]; [[6,0],[0,6]].
These are the elements of the abelian group SO(2,Z_7). See the comments for sequence A060968.
(b) those with 6 = det(M) mod 7:
[[0,1],[1,0]]; [[0,6],[6,0]]; [[1,0],[0,6]]; [[2,2],[2,5]];
[[2,5],[5,5]]; [[5,2],[2,2]]; [[5,5],[5,2]]; [[6,0],[0,1]].
Note that, for n = 3, we have 2*a(3) = 2*336 = 672 = A264083(7). (End)
		

Crossrefs

Programs

  • PARI
    { a071306(n) = my(t=n\2); prod(i=0, t-1, 7^(2*t)-7^(2*i)) * if(n%2, 7^t, 1/(7^t+(-1)^t)); } \\ Max Alekseyev, Nov 06 2022

Formula

a(2k+1) = 7^k * Product_{i=0..k-1} (7^(2k) - 7^(2i)); a(2k) = (7^k + (-1)^(k+1)) * Product_{i=1..k-1} (7^(2k) - 7^(2i)) (see MacWilliams, 1969). - Max Alekseyev, Nov 06 2022
Conjecture: Let b(n) be the number of solutions to the equation Sum_{i = 1..n} x_i^2 = 1 (mod 7) with x_i in 0..6. We conjecture that b(n) = 7*b(n-1) - 7*b(n-2) + 49*b(n-3) for n >= 4 with b(1) = 2, b(2) = 8, and b(3) = 42. We also conjecture that a(n+1) = a(n)*b(n+1) for n >= 1. - Petros Hadjicostas, Dec 19 2019

Extensions

Terms a(6) onward from Max Alekseyev, Nov 06 2022

A264083 Number of orthogonal 3 X 3 matrices over the ring Z/nZ.

Original entry on oeis.org

1, 6, 48, 384, 240, 288, 672, 6144, 1296, 1440, 2640, 18432, 4368, 4032, 11520, 49152, 9792, 7776, 13680, 92160, 32256, 15840, 24288, 294912, 30000, 26208, 34992, 258048, 48720, 69120, 59520, 393216, 126720, 58752, 161280, 497664, 101232, 82080, 209664, 1474560
Offset: 1

Views

Author

Charles Repizo, Nov 03 2015

Keywords

Comments

Number of matrices M = [a,b,c; d,e,f; g,h,i] with 0 <= a, b, c, d, e, f, g, h, i < n such that M*transpose(M) == [1,0,0; 0,1,0; 0,0,1] (mod n).
For n > 1, a(n) is divisible by 6*A060594(n)^3. - Robert Israel, Dec 16 2015

Crossrefs

Programs

  • Magma
    Enter R := IntegerRing(n);
    korthmat := function(R,n,k);
    O := [];
    M := MatrixAlgebra(R,n);
    for x in M do
    if x*Transpose(x) eq k*M!1 and Transpose(x)*x eq k*M!1 then
    O := Append(O,x);
    end if;
    end for;
    return O;
    end function;
    # korthmat(R,3,1);
    
  • Maple
    F:= proc(n) local R,V,nR,S,nS,Rp,nRp,i,j,a,b,c,t,r,r1,count;
          R:= select(t -> t[1]^2 + t[2]^2 + t[3]^2 mod n = 1, [seq(seq(seq([a,b,c],a=0..n-1),b=0..n-1),c=0..n-1)]);
          nR:= nops(R);
          S:= select(t -> t^2 mod n = 1, {$2..n-1});
          nS:= nops(S);
          for r in R do if not assigned(V[r]) then
             for c in S do V[c*r mod n] := 0 od
          fi od;
          R:= select(r -> not assigned(V[r]), R);
          nR:= nops(R);
          count:= 0;
          for i from 1 to nR do
            r:= R[i];
            Rp:= select(j -> R[j][1]*r[1] + R[j][2]*r[2] + R[j][3]*r[3] mod n = 0, [$i+1..nR]);
            nRp:= nops(Rp);
            for j from 1 to nRp do
                r1:= R[Rp[j]];
                count:= count + 6*(1+nS)^3*nops(select(k -> R[Rp[k]][1]*r1[1] + R[Rp[k]][2]*r1[2]+R[Rp[k]][3]*r1[3] mod n = 0, [$j+1..nRp]));
            od
          od;
          count;
    end proc:
    F(1):= 1:
    seq(F(n), n=1..40); # Robert Israel, Dec 16 2015
  • PARI
    my(t=Mod(matid(3), n)); sum(a=1, n, sum(b=1, n, sum(c=1, n, sum(d=1, n, sum(e=1, n, sum(f=1, n, sum(g=1, n, sum(h=1, n, sum(i=1, n, my(M=[a, b, c; d, e, f; g, h, i]); M*M~==t))))))))) \\ Charles R Greathouse IV, Nov 10 2015

Formula

For p an odd prime, a(p) = 2*p*(p^2-1). - Tom Edgar, Nov 04 2015
From Robert Israel, Dec 16 2015: (Start)
Conjectures:
a(2^k) = 12*8^k for k >= 3.
For odd primes p, a(p^k) = a(p)*p^(3k-3) for k>=1. (End)

Extensions

a(11)-a(31) from Tom Edgar, Nov 05 2015
a(31) corrected by Robert Israel, Dec 15 2015

A071900 1/4 times the number of n X n 0..7 matrices with MM' mod 8 = I, where M' is the transpose of M and I is the n X n identity matrix.

Original entry on oeis.org

1, 16, 1536, 786432, 2013265920
Offset: 1

Views

Author

R. H. Hardin, Jun 12 2002

Keywords

Examples

			From _Petros Hadjicostas_, Dec 18 2019: (Start)
For n = 2, the 4*a(2) = 64 n X n matrices M with elements in 0..7 that satisfy MM' mod 8 = I can be classified into four categories:
(a) Matrices M with 1 = det(M) mod 8. These form the abelian group SO(2, Z_8). See the comments for sequence A060968.
(b) Matrices M with 3 = det(M) mod 8. These are the elements of the left coset A*SO(2, Z_8) = {AM: M in SO(2, Z_8)}, where A = [[3,0],[0,1]].
(c) Matrices M with 5 = det(M) mod 8. These are the elements of the left coset B*SO(2, Z_8) = {BM: M in SO(2, Z_8)}, where B = [[5,0],[0,1]].
(d) Matrices M with 7 = det(M) mod 8. These are the elements of the left coset C*SO(2, Z_8) = {CM: M in SO(2, Z_8)}, where C= [[7,0],[0,1]].
All four classes of matrices have the same number of elements, that is, 16 each.
Note that for n = 3 we have 4*a(3) = 4*1536 = 6144 = A264083(8). (End)
		

Crossrefs

Formula

Conjecture: a(n) = 2^(n*(n-1)/2) * A071303(n) for n >= 1. - Michel Marcus, Nov 08 2022

A227553 Number of solutions to x^2 - y^2 - z^2 == 1 (mod n).

Original entry on oeis.org

1, 4, 6, 8, 30, 24, 42, 32, 54, 120, 110, 48, 182, 168, 180, 128, 306, 216, 342, 240, 252, 440, 506, 192, 750, 728, 486, 336, 870, 720, 930, 512, 660, 1224, 1260, 432, 1406, 1368, 1092, 960, 1722, 1008, 1806, 880, 1620, 2024, 2162, 768, 2058, 3000, 1836
Offset: 1

Views

Author

Keywords

Comments

Conjecture: a(2) = 4; if s > 1 then a(2^s) = 2^(2s-1); if p == 1 (mod 4) then a(p^s) = (p+1)*p^(2s-1); if p == 3 (mod 4) then a(p^s) = (p-1)*p^(2s-1).

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := Sum[If[Mod[a^2-b^2-c^2, n] == 1, 1, 0], {a, n}, {b, n}, {c, n}]; Table[a[n], {n, 10}]
  • PARI
    M(n,f)={sum(i=0, n-1, Mod(x^(f(i)%n), x^n-1))}
    a(n)={polcoeff(lift(M(n, i->i^2) * M(n, i->-(i^2))^2 ), 1%n)} \\ Andrew Howroyd, Jun 24 2018
Showing 1-10 of 11 results. Next