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.

Previous Showing 21-30 of 56 results. Next

A066907 Number of elements in GL(2,Z_n) x with x^2 == I mod n where I is the identity matrix.

Original entry on oeis.org

1, 4, 14, 28, 32, 56, 58, 176, 110, 128, 134, 392, 184, 232, 448, 608, 308, 440, 382, 896, 812, 536, 554, 2464, 752, 736, 974, 1624, 872, 1792, 994, 2336, 1876, 1232, 1856, 3080, 1408, 1528, 2576, 5632, 1724, 3248, 1894, 3752, 3520, 2216, 2258, 8512, 2746
Offset: 1

Views

Author

Sharon Sela (sharonsela(AT)hotmail.com), Jan 26 2002

Keywords

Comments

Number of involutory matrices mod n. - Charles R Greathouse IV, May 29 2013

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^(2*e-1)*(p+1) + 2; f[2, e_] := 9*4^(e-1)+32; f[2, 1] = 4; f[2, 2] = 28; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 02 2023 *)
  • PARI
    a(n)=my(o=valuation(n,2),f=factor(n>>o)); prod(i=1,#f[,1],f[i,1]^(2*f[i,2])+f[i,1]^(2*f[i,2]-1)+2)*if(o, if(o>1, if(o>2, 9*4^(o-1)+32,28),4),1) \\ Charles R Greathouse IV, May 29 2013

Formula

a(n) = A066947(n) + 1.
a(n) is multiplicative and for an odd prime power p^k : a(p^k) = 2 + p^(2k-1)(p+1). [corrected by Felix A. Pahl, Mar 08 2013]
From Amiram Eldar, Nov 03 2023: (Start)
Dirichlet g.f.: ((1+1/2^s+7/2^(2*s-1)+5/2^(3*s-4))/(1+5/2^s)) * (zeta(s)*zeta(s-2)/zeta(s-1)) * Product_{p prime} (1 + 2/p^(s-1) + 1/p^s).
Sum_{k=1..n} a(k) ~ c * n^3, where c = (4*zeta(3)/13) * Product_{p prime} (1 + 1/p^2 + 1/p^3 - 2/p^4 - 1/p^5) = 0.55646002711570137209... . (End)

Extensions

Added more terms (from A066947), Joerg Arndt, Mar 08 2013

A103131 The product of the residues in [1,n] relatively prime to n, taken modulo n.

Original entry on oeis.org

0, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1
Offset: 1

Views

Author

Eric W. Weisstein, Jan 23 2005

Keywords

Comments

Old name was: Minimal residue (in absolute value) of A001783(n) (mod n).
If the positive representation for integers modulo n is used this is A160377. Here the symmetric (or minimal) representation for the integers modulo n is used.
From Gauss's generalization of Wilson's theorem (see Weisstein link) it follows that, for n>1, a(n) = -1 if and only if there exists a primitive root modulo n (cf. the Hardy and Wright reference, Theorem 129. p. 102). (Adapted from a comment by Vladimir Shevelev in A001783). - Peter Luschny, Oct 20 2012

Examples

			The residues in [1, 22] relatively prime to 22 are [1, 3, 5, 7, 9, 13, 15, 17, 19, 21] and the product of those residues is -1 modulo 22.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, Theorem 129, p. 102.

Crossrefs

Programs

Formula

For n>2, a(n)=-1 if A060594(n)=2, or equivalently if n is in A033948; otherwise a(n)=1. - Max Alekseyev, May 26 2009; edited by Peter Luschny, May 25 2017.
a(n) = Gauss_factorial(n, n) modulo n. (Definition of the Gauss factorial in A216919.) - Peter Luschny, Oct 20 2012
For n > 2, a(n) = (-1)^A211487(n). (See Max Alekseyev's formula above.) - Antti Karttunen, Aug 22 2017

Extensions

Definition rewritten by Max Alekseyev, May 26 2009
New name from Peter Luschny, Oct 20 2012
a(2) set to 1 by Peter Luschny, May 25 2017

A164822 Triangle read by rows, giving the number of solutions mod j of T_k(x) = 1, for j >= 2 and k = 1:j-1, where T_k is the k'th Chebyshev polynomial of the first kind.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 4, 1, 5, 1, 1, 2, 2, 2, 1, 4, 1, 4, 1, 7, 1, 4, 1, 1, 2, 3, 4, 1, 6, 1, 4, 1, 4, 2, 5, 1, 8, 1, 5, 2, 1, 2, 2, 2, 3, 4, 1, 2, 2, 6, 1, 4, 1, 11, 1, 4, 1, 11, 1, 4, 1, 1, 2, 2, 2, 1, 4, 4, 2, 2, 2, 1, 6, 1, 4, 2, 5, 1, 8, 1, 9, 2, 4, 1, 9, 1, 1, 4, 2, 8, 1, 8, 1, 8, 2, 4, 1, 14, 1
Offset: 1

Views

Author

Keywords

Comments

T_k(0) = 1 if k == 0 mod 4, but x=0 is not counted as a solution. - Robert Israel, Apr 06 2015

Examples

			The triangle of numbers is:
.....k..1..2..3..4..5..6..7..8..9.10
..j..
..2.....1
..3.....1..2
..4.....1..2..1
..5.....1..2..2..2
..6.....1..4..1..5..1
..7.....1..2..2..2..1..4
..8.....1..4..1..7..1..4..1
..9.....1..2..3..4..1..6..1..4
.10.....1..4..2..5..1..8..1..5..2
.11.....1..2..2..2..3..4..1..2..2..6
		

Crossrefs

Programs

  • Maple
    seq(seq(nops(select(t -> orthopoly[T](k, t)-1 mod j = 0, [$1..j-1])), k=1..j-1), j=2..20); # Robert Israel, Apr 06 2015
  • Mathematica
    Table[Length[Select[Range[j-1], Mod[ChebyshevT[k, #]-1, j] == 0&]], {j, 2, 20}, {k, 1, j-1}] // Flatten (* Jean-François Alcover, Mar 27 2019, after Robert Israel *)

Formula

From Robert Israel, Apr 06 2015 (Start):
a(k,j) is multiplicative in j for each odd k.
a(k,j)+1 is multiplicative in j for k divisible by 4.
a(k,j)+[j=2] is multiplicative in j for k == 2 mod 4, where [j=2] = 1 if j=2, 0 otherwise.
a(1,j) = 1.
a(2,j) = A060594(j) if j is odd, A060594(j/2) if j is even.
a(3,2^m) = 1.
a(3,p^m) = p^floor(m/2)+1 if p is a prime > 3.
a(4,p^m) = p^floor(m/2)+1 if p is a prime > 2.
a(5,p) = 3 if p is in A045468, 1 for other primes p. (End)

Extensions

Sequence and definition corrected by Christopher Hunt Gribble, Sep 10 2009
Minor edit by N. J. A. Sloane, Sep 13 2009

A182039 Order of the group O(2,Z_n); number of orthogonal 2 X 2 matrices over the ring Z/nZ.

Original entry on oeis.org

1, 2, 8, 16, 8, 16, 16, 64, 24, 16, 24, 128, 24, 32, 64, 128, 32, 48, 40, 128, 128, 48, 48, 512, 40, 48, 72, 256, 56, 128, 64, 256, 192, 64, 128, 384, 72, 80, 192, 512, 80, 256, 88, 384, 192, 96, 96, 1024, 112, 80, 256, 384, 104, 144, 192, 1024, 320, 112, 120, 1024, 120, 128, 384, 512, 192, 384, 136, 512, 384, 256, 144, 1536
Offset: 1

Views

Author

Keywords

Comments

Number of matrices M = [a,b;c,d] with 0 <= a,b,c,d < n such that M*transpose(M) == [1,0;0,1] (mod n).
From Jianing Song, Nov 05 2019: (Start)
Elements in O(2,Z_n) are of the form [x,y;-ty,tx], where x^2+y^2 == 1 (mod n), t^2 == 1 (mod n). Proof: If n = Product_{i=1..k} (p_i)^(e_i), then it can be shown by the Chinese Remainder Theorem that O(2,Z_n) is isomorphic to Product_{i=1..k} O(2,Z_(p_i)^(e_i)), so we can just study the elements in O(2,Z_p^e).
Let M = [x,y;z,w] be such a matrix; according to the conditions we have x^2+y^2 == z^2+w^2 == 1 (mod p^e), x*z+y*w == 0 (mod p^e). Here at least one of x,y is coprime to p^e, otherwise x^2+y^2 cannot be congruent to 1 mod p^e. If gcd(x,p^e) = 1, let t = x^(-1)*w; if gcd(y,p^e) = 1, let t = -y^(-1)*z (if gcd(x,p^e) = gcd(y,p^e) = 1 then these two t's are the same), then M = [x,y;-ty,tx] with determinant t, so t^2 == 1 (mod p^e). Specially, the elements in SO(2,Z_n) are of the form [x,y;-y,x], as the determinant is restricted to 1 mod n. See also A060968.
Note that O(2,Z_n) is non-abelian when n > 2: [0,1;-1,0] * [-1,0;0,1] = [0,1;1,0], but [-1,0;0,1] * [0,1;-1,0] = [0,-1;-1,0].
In general, let R be any commutative ring with unity, O(m,R) be the group of m X m matrices M over R such that M*M^T = I and SO(m,R) be the group of m X m matrices M over R such that M*M^T = I and det(M) = 1, then O(m,R)/SO(m,R) is isomorphic to {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. Here, O(2,Z_n) is the internal semiproduct of SO(2,Z_n) and {[a,0;0,1]: a^2 = 1}. As a result:
If p is an odd prime or p^e = 4, then O(2,Z_p^e) is the internal semiproduct of SO(2,Z_p^e) and {I, P}, where I = [1,0;0,1] and P = [-1,0;0,1]. For any M in SO(2,Z_p^e), we have P*M*P = M^(-1). For odd primes p, O(2,Z_p^e) is, in fact, isomorphic to the dihedral group D_(2*(p+1)*p^(e-1)) if p == 3 (mod 4) and D_(2*(p-1)*p^(e-1)) if p == 1 (mod 4), since SO(2,Z_p^e) is cyclic as discussed in A060968. O(2,Z_4) is isomorphic to D_8 X C_2.
If e >= 3, then O(2,Z_2^e) is the internal semiproduct of SO(2,Z_2^e) and {I, P, Q, P*Q}, where I = [1,0;0,1], P = [-1,0;0,1] and Q = [2^(e-1)+1,0;0,1]. For any M in SO(2,Z_2^e), we have P*M*P = M^(-1); Q*M*Q = M if the upper-right entry of M is even, (2^(e-1)+1)*M otherwise.
The exponent of O(2,Z_n) (i.e., least e > 0 such that M^e = I for every M in O(2,Z_n)) is given by A235863(n).
The rank of O(2,Z_n) (i.e., the minimum number of generators) is 2*omega(n) if n is odd, 2*omega(n)-1 if n is even but not divisible by 4, 2*omega(n)+1 if n is divisible by 4 but not by 8 and 2*omega(n)+3 if n is divisible by 8, omega = A001221.
(End) [Comment partly rewritten by Jianing Song, Oct 09 2020]

Examples

			a(1) = 1 because 1 = 0 in the zero ring, so although there only exists the zero matrix, it still equals the unit matrix.
O(2,Z_6) = {[0,1;5,0], [0,1;1,0], [0,5;1,0], [0,5;5,0], [1,0;0,1], [1,0;0,5], [2,3;3,2], [2,3;3,4], [3,2;4,3], [3,2;2,3], [3,4;2,3], [3,4;4,3], [4,3;3,4], [4,3;3,2], [5,0;0,5], [5,0;0,1]}, so a(6) = 16.
For n = 16, SO(2,Z_16) is generated by [9,0;0,9], [0,1;-1,0], and [4,1;-1,4] (see Jianing Song link in A060968), so O(2,Z_16) is generated by [-1,0;0,1], [9,0;0,1], [9,0;0,9], [0,1;-1,0], and [4,1;-1,4], which gives O(2,Z_16) is isomorphic to the semiproduct of C_2 X C_4 X C_4 and C_2 X C_2, so a(16) = 128.
		

Crossrefs

Cf. A060968 (order of SO(2,Z_n)), A060594, A235863, A001221, A209411.

Programs

  • Mathematica
    gg[n_]:=gg[n]=Flatten[Table[{{x,y},{z,t}},{x,n},{y,n},{t,n},{z,n}],3];
    orto[1]=1;
    orto[n_]:=orto[n]=Length@gg[n][[Select[Range[Length[gg[n]]],Mod[gg[n][[#]].Transpose[gg[n][[#]]],n]=={{1,0},{0,1}}&]]];
    Table[Print[orto[n]];orto[n],{n,1,22}]
  • PARI
    a(n)=
    {
        my(r=1, f=factor(n));
        for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
            if(p==2 && e==1, r*=2);
            if(p==2 && e==2, r*=16);
            if(p==2 && e>=3, r*=2^(e+3));
            if(p%4==1, r*=2*(p-1)*p^(e-1));
            if(p%4==3, r*=2*(p+1)*p^(e-1));
        );
        return(r);
    }
    \\ Jianing Song, Nov 05 2019

Formula

From Jianing Song, Nov 05 2019: (Start)
a(n) = A060968(n) * A060594(n).
Multiplicative with a(2) = 2, a(4) = 16, a(2^e) = 2^(e+3) for e >= 3; a(p^e) = 2*(p-1)*p^(e-1) if p == 1 (mod 4), 2*(p+1)*p^(e-1) if p == 3 (mod 4).
(End)

Extensions

Terms beyond a(22) from Joerg Arndt, Apr 13 2012
a(1) changed to 1 by Andrey Zabolotskiy, Nov 13 2019

A277776 Triangle T(n,k) in which the n-th row contains the increasing list of nontrivial square roots of unity mod n; n>=1.

Original entry on oeis.org

3, 5, 5, 7, 4, 11, 7, 9, 9, 11, 8, 13, 5, 7, 11, 13, 17, 19, 13, 15, 11, 19, 15, 17, 10, 23, 6, 29, 17, 19, 14, 25, 9, 11, 19, 21, 29, 31, 13, 29, 21, 23, 19, 26, 7, 17, 23, 25, 31, 41, 16, 35, 25, 27, 21, 34, 13, 15, 27, 29, 41, 43, 20, 37, 11, 19, 29, 31, 41
Offset: 1

Views

Author

Alois P. Heinz, Oct 30 2016

Keywords

Comments

Rows with indices n in A033948 (or with A046144(n)=0) are empty. Indices of nonempty rows are given by A033949.
This is A228179 without the trivial square roots {1, n-1}.
The number of terms in each nonempty row n is even: A060594(n)-2.

Examples

			Row n=8 contains 3 and 5 because 3*3 = 9 == 1 mod 8 and 5*5 = 25 == 1 mod 8.
Triangle T(n,k) begins:
08 :   3,  5;
12 :   5,  7;
15 :   4, 11;
16 :   7,  9;
20 :   9, 11;
21 :   8, 13;
24 :   5,  7, 11, 13, 17, 19;
28 :  13, 15;
30 :  11, 19;
		

Crossrefs

Columns k=1-2 give: A082568, A357099.
Last elements of nonempty rows give A277777.

Programs

  • Maple
    T:= n-> seq(`if`(i*i mod n=1, i, [][]), i=2..n-2):
    seq(T(n), n=1..100);
    # second Maple program:
    T:= n-> ({numtheory[rootsunity](2, n)} minus {1, n-1})[]:
    seq(T(n), n=1..100);
  • Mathematica
    T[n_] := Table[If[Mod[i^2, n] == 1, i, Nothing], {i, 2, n-2}];
    Select[Array[T, 100], # != {}&] // Flatten (* Jean-François Alcover, Jun 18 2018, from first Maple program *)
  • Python
    from itertools import chain, count, islice
    from sympy.ntheory import sqrt_mod_iter
    def A277776_gen(): # generator of terms
        return chain.from_iterable((sorted(filter(lambda m:1A277776_list = list(islice(A277776_gen(),30)) # Chai Wah Wu, Oct 26 2022

A354057 Square array read by ascending antidiagonals: T(n,k) is the number of solutions to x^k == 1 (mod n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 4, 3, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 4, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 6, 1, 4, 1, 2, 1, 1, 1, 4, 1, 4, 1, 4, 1, 2, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Jianing Song, May 16 2022

Keywords

Comments

Row n and Row n' are the same if and only if (Z/nZ)* = (Z/n'Z)*, where (Z/nZ)* is the multiplicative group of integers modulo n.
Given n, T(n,k) only depends on gcd(k,psi(n)). For the truncated version see A354060.
Each column is multiplicative.

Examples

			  n/k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
   1   1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
   2   1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
   3   1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2
   4   1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2
   5   1  2  1  4  1  2  1  4  1  2  1  4  1  2  1  4  1  2  1  4
   6   1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2  1  2
   7   1  2  3  2  1  6  1  2  3  2  1  6  1  2  3  2  1  6  1  2
   8   1  4  1  4  1  4  1  4  1  4  1  4  1  4  1  4  1  4  1  4
   9   1  2  3  2  1  6  1  2  3  2  1  6  1  2  3  2  1  6  1  2
  10   1  2  1  4  1  2  1  4  1  2  1  4  1  2  1  4  1  2  1  4
  11   1  2  1  2  5  2  1  2  1 10  1  2  1  2  5  2  1  2  1 10
  12   1  4  1  4  1  4  1  4  1  4  1  4  1  4  1  4  1  4  1  4
  13   1  2  3  4  1  6  1  4  3  2  1 12  1  2  3  4  1  6  1  4
  14   1  2  3  2  1  6  1  2  3  2  1  6  1  2  3  2  1  6  1  2
  15   1  4  1  8  1  4  1  8  1  4  1  8  1  4  1  8  1  4  1  8
  16   1  4  1  8  1  4  1  8  1  4  1  8  1  4  1  8  1  4  1  8
  17   1  2  1  4  1  2  1  8  1  2  1  4  1  2  1 16  1  2  1  4
  18   1  2  3  2  1  6  1  2  3  2  1  6  1  2  3  2  1  6  1  2
  19   1  2  3  2  1  6  1  2  9  2  1  6  1  2  3  2  1 18  1  2
  20   1  4  1  8  1  4  1  8  1  4  1  8  1  4  1  8  1  4  1  8
		

Crossrefs

k-th column: A060594 (k=2), A060839 (k=3), A073103 (k=4), A319099 (k=5), A319100 (k=6), A319101 (k=7), A247257 (k=8).
Applying Moebius transform to the rows gives A354059.
Applying Moebius transform to the columns gives A354058.
Cf. A327924.

Programs

  • PARI
    T(n,k)=my(Z=znstar(n)[2]); prod(i=1, #Z, gcd(k, Z[i]))

Formula

If (Z/nZ)* = C_{k_1} X C_{k_2} X ... X C_{k_r}, then T(n,k) = Product_{i=1..r} gcd(k,k_r).
T(p^e,k) = gcd((p-1)*p^(e-1),k) for odd primes p. T(2,k) = 1, T(2^e,k) = 2*gcd(2^(e-2),k) if k is even and 1 if k is odd.
A327924(n,k) = Sum_{q|n} T(n,k) * (Sum_{s|n/q} mu(s)/phi(s*q)).

A072273 Index of powers of 2 that equal the number of noncongruent roots to the congruence x^2 == k (mod n) for (k,n)=1 and assuming solvability.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 3, 1, 2, 1, 2, 2, 1, 1, 3, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 1, 2, 2, 2, 2, 1, 3, 1, 1, 1, 3, 2, 1, 2, 3, 1, 2, 2, 2, 2, 1, 2, 3, 1, 1, 2, 2, 1, 2, 1, 3, 3
Offset: 1

Views

Author

Lekraj Beedassy, Jul 09 2002

Keywords

Crossrefs

Cf. A060594.
Cf. A046072. - R. J. Mathar, Dec 15 2008

Programs

Formula

2^a(n) = A060594(n).
a(n) = A005087(n) + i, where i may be 0, 1 or 2 according as 2^j divides n, respectively with j <= 1, j = 2 or j >= 3, (i.e., i=0 when n is not divisible by 4; i=1 when n is divisible by 4 but not by 8; i=2 when n is divisible by 8).

Extensions

Corrected and extended by T. D. Noe, Sep 09 2005

A147848 Number (up to isomorphism) of groups of order 2n that have Z/nZ as a subgroup (that is, that have an element of order n).

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 4, 6, 2, 4, 2, 8, 4, 4, 2, 12, 2, 4, 2, 8, 2, 8, 2, 6, 4, 4, 4, 8, 2, 4, 4, 12, 2, 8, 2, 8, 4, 4, 2, 12, 2, 4, 4, 8, 2, 4, 4, 12, 4, 4, 2, 16, 2, 4, 4, 6, 4, 8, 2, 8, 4, 8, 2, 12, 2, 4, 4, 8, 4, 8, 2, 12, 2, 4, 2, 16, 4
Offset: 1

Views

Author

Ilia Smilga (ilia.smilga(AT)ens.fr), Nov 15 2008

Keywords

Comments

This sequence is related to A060594: in fact, for every square root of unity modulo n, there are either one or two such groups of order 2n.
For n >= 3, a(n) is also the number of equivalence classes of automorphisms of order 2 (involutions) of the dihedral group D_n (see the reference below). - Tom Edgar, Jul 03 2013

Examples

			Two such groups that always exist are the cyclic group Z/(2n)Z and the dihedral group Dih_n. If n is prime, these are the only such groups, so a(p)=2 when p is prime.
For even values of n, we also have the direct product Z/nZ x Z/2Z and the dicyclic group Dic_n. If n = 2p with p prime, there are no other groups, so a(2*p)=4 when p is prime.
There exist five groups (up to isomorphism) of order 2*4 = 8. Four of them have Z/4Z as a subgroup, the two abelian groups: Z/8Z and Z/4Z x Z/2Z, also the two nonabelian groups: the Dihedral group Dih_4 and the Quaternion group or Hamiltonian group: Q_8 = H_8 = Dic_2. So, a(4) = 4. The only group which does not have Z/4Z as a subgroup is the abelian group Z/2Z x Z/2Z x Z/2Z = (Z/2Z)^3. - _Bernard Schott_, Mar 03 2019
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[2] = 2; a[4] = 4; a[n_] := a[n] = (f = FactorInteger[n]; np = Length[f]; Which[ np == 1 && f[[1, 1]] == 2 && f[[1, 2]] >= 3, 6, np == 1 && PrimeQ[f[[1, 1]]] && f[[1, 2]] >= 1, 2, np > 1 && f[[1, 1]] != 2, 2^np, np > 1 && f[[1]] == {2, 1}, 2^np, np > 1 && f[[1]] == {2, 2}, 2^(np+1), np > 1 && f[[1, 1]] == 2 && f[[1, 2]] > 1, 3*2^np, True, 0]); Table[a[n], {n, 1, 60}](* Jean-François Alcover, Nov 22 2011 *)
    a[n_] := Sum[Sum[If[Mod[n, k] == 0, If[Mod[m, n/k] == 0, 1, 0], 0]*If[Mod[m + 2, k] == 0, 1, 0], {k, 1, n}], {m, 1, n}]; a /@Range[85] (* Dirichlet convolution, Mats Granvik, Mar 03 2019 *)
    a[n_] := Sum[If[Mod[n, k] == 0, Sum[If[GCD[k, n/k] == j, j, 0], {j, 2}],
       0], {k, n}]; a /@ Range[85] (* GCD sum, Mats Granvik, Mar 03 2019 *)
    a[n_] := Sum[j*Count[Divisors[n], d_ /; GCD[d, n/d] == j], {j, 2}];
    a/@Range[85] (* After Jean-François Alcover in A034444. - Mats Granvik, Mar 03 2019 *)
    f[2, e_] := Which[e == 1, 2, e == 2, 4, e >= 3, 6]; f[p_, e_] := 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 17 2020 *)
  • PARI
    a(n)=my(k=valuation(n,2));max(2*min(k,3),1)<>k) \\ Charles R Greathouse IV, Nov 22 2011

Formula

a(2) = 2, a(2^2) = 4, a(2^k) = 6 for k >= 3.
a(p^k) = 2 for any odd prime number p and k >= 1.
For other values of n, you can find a(n) by using the fact that the sequence is multiplicative.
Dirichlet g.f.: zeta^2(s)*(1+2^s+2^(1-s)-4^(1-s)+6*4^(-s)) / ( zeta(2*s)*(1+2^s) ). - R. J. Mathar, Jun 01 2011
Sum_{k=1..n} a(k) ~ (9*n/Pi^2) * (log(n) - 1 + 2*gamma - 2*log(2)/3 - 12*Zeta'(2) / Pi^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 07 2019
From Mats Granvik, Mar 03 2019: (Start)
a(n) = Sum_{m=1..n} Sum_{k=1..n} (k divides n)*(n/k divides m)*(k divides m + 2).
a(n) = Sum_{k=1..n} (k divides n)*Sum_{j=1..2} (gcd(k, n/k) = j)*j. (End)

Extensions

Extended comments, references and confirmed "mult" keyword. - Ilia Smilga (ilia.smilga(AT)ens.fr), Nov 17 2008

A160377 Phi-torial of n (A001783) modulo n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 1, 12, 13, 1, 1, 16, 17, 18, 1, 1, 21, 22, 1, 24, 25, 26, 1, 28, 1, 30, 1, 1, 33, 1, 1, 36, 37, 1, 1, 40, 1, 42, 1, 1, 45, 46, 1, 48, 49, 1, 1, 52, 53, 1, 1, 1, 57, 58, 1, 60, 61, 1, 1, 1, 1, 66, 1, 1, 1, 70, 1, 72, 73, 1, 1, 1, 1, 78, 1, 80, 81, 82, 1, 1, 85, 1, 1
Offset: 1

Views

Author

J. M. Bergot, May 11 2009

Keywords

Comments

Is a(n)<> 1 iff n in A033948, n>2? [R. J. Mathar, May 21 2009]
Same as A103131, except there -1 appears instead of n-1. By Gauss's generalization of Wilson's theorem, a(n)=-1 means n has a primitive root (n in A033948) and a(n)=1 means n has no primitive root (n in A033949). [T. D. Noe, May 21 2009]

Examples

			Phi-torial of 12 equals 1*5*7*11=385 which leaves a remainder of 1 when divided by 12.
Phi-torial of 14 equals 1*3*5*9*11*13=19305 which leaves a remainder of 13 when divided by 14.
		

Crossrefs

Cf. A124740 (one of just four listing "product of coprimes").

Programs

  • Maple
    copr := proc(n) local a,k ; a := {1} ; for k from 2 to n-1 do if gcd(k,n) = 1 then a := a union {k} ; fi; od: a ; end:
    A001783 := proc(n) local c; mul(c,c= copr(n)) ; end:
    A160377 := proc(n) A001783(n) mod n ; end: seq( A160377(n),n=1..100) ; # R. J. Mathar, May 21 2009
    A160377 := proc(n) local k, r; r := 1:
    for k to n do if igcd(n,k) = 1 then r := modp(r*k, n) fi od;
    r end: seq( A160377(i), i=1..88); # Peter Luschny, Oct 20 2012
  • Mathematica
    Table[nn = n; a = Select[Range[nn], CoprimeQ[#, nn] &];
    Mod[Apply[Times, a], nn], {n, 1, 88}] (* Geoffrey Critzer, Jan 03 2015 *)
  • Sage
    def A160377(n):
        r = 1
        for k in (1..n):
            if gcd(n, k) == 1: r = mod(r*k, n)
        return r
    [A160377(n) for n in (1..88)]  # Peter Luschny, Oct 20 2012

Formula

a(n) = A001783(n) mod n. - R. J. Mathar, May 21 2009
For n>2, a(n)=n-1 if A060594(n)=2; otherwise a(n)=1. - Max Alekseyev
a(n) = Gauss_factorial(n, n) modulo n. (Definition of the Gauss factorial in A216919.) - Peter Luschny, Oct 20 2012

Extensions

Edited and extended by R. J. Mathar and Max Alekseyev, May 21 2009

A208296 Smallest positive nontrivial odd solution of the congruence x^2 == 1 (mod A001748(n+2)), n >= 1.

Original entry on oeis.org

11, 13, 23, 25, 35, 37, 47, 59, 61, 73, 83, 85, 95, 107, 119, 121, 133, 143, 145, 157, 167, 179, 193, 203, 205, 215, 217, 227, 253, 263, 275, 277, 299, 301, 313, 325, 335, 347, 359, 361, 383, 385, 395, 397, 421, 445, 455, 457, 467, 479, 481, 503, 515
Offset: 1

Views

Author

Wolfdieter Lang, Mar 14 2012

Keywords

Comments

The trivial solutions of the congruence x^2 == 1 (mod 3*prime(n+2)), n>=1, with the primes prime(n+2) = A000040(n+2) have positive representatives 1 and 3*prime(n+2)-1. There are all-together four incongruent solutions due to a general theorem (see, e.g., the Hardy-Wright reference, Theorem 122, p. 96, and also A060594) and the fact that the number of incongruent solutions of this congruence with odd prime modulus p is two, namely with positive representative p and p-1 (see, e.g., Hardy-Wright, Theorem 109, p. 85). a(n) is the smallest positive odd representative >1 which solves this congruence. The other nontrivial even representative solving this congruence is 3*prime(n+2) - a(n), i.e. 4, 8, 10, 14, 16, 20, ... See 2*A207336.
a(n) solves also the congruence x^2 == 1 (Modd A001748(n+2)), n>=1. For Modd n (not to be confused with mod n) see a comment on A203571. This follows from floor(a(n)^2/3*prime(n+2)) being even, in fact it is 8*A024699(n) (see a comment there), hence a(n)^2 (Modd 3*prime(n+2)) = a(n)^2 (mod 3*prime(n+2)) = 1. For those multiplicative groups Modd 3*p with p an odd prime which are cyclic (this is not possible in the mod case, see A033949), a(n) is the representative of the only other nontrivial solution of this congruence. The representative of the trivial solution is 1 (-1 belongs to the same Modd class). (The conjecture stated here earlier is wrong, that is, the multiplicative group Modd (91=7*13) is non-cyclic. It may still be true for 3*p. - Wolfdieter Lang, Mar 15 2012)

Examples

			a(3)=23 because prime(5)=11=A007528(2), hence K(3)=11 and sqrt(8*T(11)+1)=sqrt(8*66+1)= 23. 23^2 = 529 == 1 (Modd 33), because floor(529/33)=16=8*A024699(3) is even, and 529 == 1 (mod 33).
a(4)=25 because prime(6)=13=A002476(2), hence K(4)=12 and sqrt(8*T(12)+1)=sqrt(8*78+1)=25. 25^2 = 625 == 1 (Modd 39), because floor(625/39)=16=8*A024699(4) is even, and 625 == 1 (mod 39).
		

References

  • H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 5th ed., Clarendon Press, Oxford, 2003.

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Solve[x^2==1 && x !=1,x, Modulus->3*Prime[n+2]][[All,1,2]],OddQ], {n, 53}] (* Jon Maiga, Sep 28 2019 *)

Formula

a(n) = sqrt(8*T(K(n))+1), with the triangular numbers T = A000217, and K(n) = prime(n+2)-1 if the prime prime(n+2) is of the form 6*k+1, i.e., from A002476, and K(n) = prime(n+2) if prime(n+2) is of the form 6*k-1, i.e. from A007528.
a(n)^2 == 1 (mod A001748(n+2)), n >= 1.
a(n)^2 == 1 (Modd A001748(n+2)), n >= 1.
Previous Showing 21-30 of 56 results. Next