A157235
Number of primitive inequivalent oblique sublattices of hexagonal (triangular) lattice of index n (equivalence and symmetry of sublattices are determined using only parent lattice symmetries).
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 2, 1, 3, 2, 2, 2, 5, 2, 4, 3, 5, 3, 4, 4, 6, 5, 6, 4, 10, 4, 6, 6, 8, 6, 10, 5, 9, 7, 8, 6, 14, 6, 10, 10, 11, 7, 12, 8, 14, 10, 12, 8, 17, 10, 12, 11, 14, 9, 20, 9, 15, 14, 14, 12, 22, 10, 16, 14, 22, 11, 20, 11, 18, 18, 18
Offset: 1
Cf.
A003051 (all sublattices),
A003050 (all primitive sublattices),
A154272 (primitive sublattices fully inheriting the parent lattice symmetry, inlcuding the orientation of the mirrors),
A000086 (primitive rotation-symmetric sublattices, counting mirror images as distinct),
A060594 (primitive mirror-symmetric sublattices),
A145377 (all sublattices inheriting the parent lattice symmetry),
A304182.
A235384
Number of involutions in the group Aff(Z/nZ).
Original entry on oeis.org
2, 4, 6, 6, 8, 8, 16, 10, 12, 12, 24, 14, 16, 24, 28, 18, 20, 20, 36, 32, 24, 24, 64, 26, 28, 28, 48, 30, 48, 32, 52, 48, 36, 48, 60, 38, 40, 56, 96, 42, 64, 44, 72, 60, 48, 48, 112, 50, 52, 72, 84, 54, 56, 72, 128, 80, 60, 60, 144, 62, 64, 80, 100, 84
Offset: 2
Since 18 = 2*3^2, we get a(18) = 2*(3^2+1) = 20. Since 120 = 2^3*3*5, we have a(120) = (4+2^2+2^3)*(3+1)*(5+1) = 384.
- Alois P. Heinz, Table of n, a(n) for n = 2..10000
- K. K. A. Cunningham, Tom Edgar, A. G. Helminck, B. F. Jones, H. Oh, R. Schwell and J. F. Vasquez, On the Structure of Involutions and Symmetric Spaces of Dihedral Groups, Note di Mat., Volume 34, No. 2, 2014.
-
a:= n-> add(`if`(irem(k^2, n)=1, igcd(n, k+1), 0), k=1..n-1):
seq(a(n), n=2..100); # Alois P. Heinz, Jan 20 2014
-
a[n_] := Sum[If[Mod[k^2, n] == 1, GCD[n, k+1], 0], {k, 1, n-1}]; Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Mar 24 2014, after Alois P. Heinz *)
f[p_, e_] := p^e + 1; f[2, 1] = 2; f[2, 2] = 6; f[2, e_] := 3*2^(e - 1) + 4; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100, 2] (* Amiram Eldar, Dec 05 2022 *)
-
A034448(n,f=factor(n))=factorback(vector(#f~,i,f[i,1]^f[i,2]+1))
a(n)=my(m=valuation(n,2)); if(m==0,1,m==1,2,m==2,6,4+3<<(m-1))*A034448(n>>m) \\ Charles R Greathouse IV, Jul 29 2016
-
def a(n):
L=list(factor(n))
if L[0][0]==2:
m=L[0][1]
L.pop(0)
else:
m=0
order=prod([x[0]^x[1]+1 for x in L])
if m==1:
order=2*order
elif m==2:
order=6*order
elif m>=3:
order=(4+2^(m-1)+2^m)*order
return order
[a(i) for i in [2..100]]
-
def b(n):
sum = 0
for a in [x for x in range(n) if ((x^2) % n == 1)]:
sum += gcd(a+1,n)
return sum
[b(i) for i in [2..100]]
A252911
Irregular triangular array read by rows: T(n,k) is the number of elements in the multiplicative group of integers modulo n that have order k, n>=1, 1<=k<=A002322(n).
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 2, 0, 0, 2, 1, 3, 1, 1, 2, 0, 0, 2, 1, 1, 0, 2, 1, 1, 0, 0, 4, 0, 0, 0, 0, 4, 1, 3, 1, 1, 2, 2, 0, 2, 0, 0, 0, 0, 0, 4, 1, 1, 2, 0, 0, 2, 1, 3, 0, 4, 1, 3, 0, 4, 1, 1, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 1, 1, 2, 0, 0, 2, 1, 1, 2, 0, 0, 2, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 6, 1, 3, 0, 4
Offset: 1
1;
1;
1, 1;
1, 1;
1, 1, 0, 2;
1, 1;
1, 1, 2, 0, 0, 2;
1, 3;
1, 1, 2, 0, 0, 2;
1, 1, 0, 2;
1, 1, 0, 0, 4, 0, 0, 0, 0, 4;
1, 3;
1, 1, 2, 2, 0, 2, 0, 0, 0, 0, 0, 4;
1, 1, 2, 0, 0, 2;
1, 3, 0, 4;
T(15,2)=3 because the elements 4, 11, and 14 have order 2 in the modulo multiplication group (Z/15Z)*. We observe that 4^2, 11^2, and 14^2 are congruent to 1 mod 15.
-
with(numtheory):
T:= n-> `if`(n=1, 1, (p-> seq(coeff(p, x, j), j=1..degree(p)))(
add(`if`(igcd(n, i)>1, 0, x^order(i, n)), i=1..n-1))):
seq(T(n), n=1..30); # Alois P. Heinz, Dec 30 2014
-
Table[Table[
Count[Table[
MultiplicativeOrder[a, n], {a,
Select[Range[n], GCD[#, n] == 1 &]}], k], {k, 1,
CarmichaelLambda[n]}], {n, 1, 20}] // Grid
A327925
Irregular table read by rows: T(m,n) is the number of non-isomorphic groups G such that G is the semidirect product of C_m and C_n, where C_m is a normal subgroup of G and C_n is a subgroup of G, 1 <= n <= A002322(m).
Original entry on oeis.org
1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 4, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 2, 1, 4, 1, 4, 1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1, 6, 1, 2, 2, 2, 1, 4, 1, 4, 1, 6, 1, 4, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 2, 2, 1, 6
Offset: 1
Table starts
m = 1: 1;
m = 2: 1;
m = 3: 1, 2;
m = 4: 1, 2;
m = 5: 1, 2, 1, 3;
m = 6: 1, 2;
m = 7: 1, 2, 2, 2, 1, 4;
m = 8: 1, 4;
m = 9: 1, 2, 2, 2, 1, 4;
m = 10: 1, 2, 1, 3;
m = 11: 1, 2, 1, 2, 2, 2, 1, 2, 1, 4;
m = 12: 1, 4;
m = 13: 1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1, 6;
m = 14: 1, 2, 2, 2, 1, 4;
m = 15: 1, 4, 1, 6;
m = 16: 1, 4, 1, 6;
m = 17: 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5;
m = 18: 1, 2, 2, 2, 1, 4;
m = 19: 1, 2, 2, 2, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 2, 2, 1, 6;
m = 20: 1, 4, 1, 6;
Example shows that T(21,6) = 6: The semidirect product of C_21 and C_6 has group representation G = <x, y|x^21 = y^6 = 1, yxy^(-1) = x^r>, where r = 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, 20. Since 2^5 == 11 (mod 21), 4^5 == 16 (mod 21), 5^5 == 17 (mod 21), 10^5 == 19 (mod 21), there are actually four pairs of isomorphic groups, giving a total of 8 non-isomorphic groups.
-
numord(n,q) = my(v=divisors(q),r=znstar(n)[2]); sum(i=1,#v,prod(j=1,#r,gcd(v[i],r[j]))*moebius(q/v[i]))
T(m,n) = my(u=divisors(n)); sum(i=1,#u,numord(m,u[i])/eulerphi(u[i]))
Row(m) = my(l=if(m>2,znstar(m)[2][1],1), R=vector(l,n,T(m,n))); R
A343292
Number of distinct results produced when generating a graphical image of each row of the multiplication table modulo n.
Original entry on oeis.org
1, 2, 3, 4, 4, 6, 5, 8, 7, 9, 7, 12, 8, 12, 13, 14, 10, 16, 11, 18, 17, 18, 13, 24, 16, 21, 19, 24, 16, 28, 17, 26, 25, 27, 25, 32, 20, 30, 29, 36, 22, 38, 23, 36, 35, 36, 25, 44, 29, 41, 37, 42, 28, 46, 37, 48, 41, 45, 31, 56, 32, 48, 47, 50, 43, 58, 35, 54, 49, 60
Offset: 1
Modulo 11, the 2 and 6 time tables, the 3 and 4 time tables, the 5 and 9 time tables, and the 7 and 8 time tables give the same pattern. So there are only 7 different time tables (0,1,2,3,5,7 and 10).
- Michael De Vlieger, Scatterplot of (n, a(n)) for n=1..2^16.
- Michael De Vlieger, Annotated scatterplot of (n, a(n)) for n=1..240, labeling a(n), with color function related to ratio (a(n)+(n+3)/2)/((n-3)/2), black for prime n. Red dashed line has slope 1. Blue dashed line = (a(n)+3)/2.
- Michael De Vlieger, Annotated scatterplot of (n, (a(n)+(n+3)/2)/((n-3)/2)) for n=1..2^12, the highest values are labeled a(n).
- Steve Phelps, Modular Times Table, GeoGebra.
-
{1}~Join~Array[# - (EulerPhi[#] - Sum[Boole[Mod[k^2, #] == 1], {k, #}])/2 &, 69, 2] (* Michael De Vlieger, Apr 13 2021 *)
-
G(n,r)={Set(vector(n, i, my(j=i*r%n); [min(i,j), max(i,j)]))}
a(n)={#Set(vector(n, k, concat(G(n,k-1))))} \\ Andrew Howroyd, Apr 12 2021
-
\\ here b(n) is A060594(n).
b(n)={my(o=valuation(n, 2)); 2^(omega(n>>o)+max(min(o-1, 2), 0))}
a(n)={n - (eulerphi(n)-b(n))/2} \\ Andrew Howroyd, Apr 12 2021
A358016
a(n) is the largest k <= n-2 such that k^2 == 1 (mod n).
Original entry on oeis.org
1, 1, 1, 1, 1, 5, 1, 1, 1, 7, 1, 1, 11, 9, 1, 1, 1, 11, 13, 1, 1, 19, 1, 1, 1, 15, 1, 19, 1, 17, 23, 1, 29, 19, 1, 1, 25, 31, 1, 29, 1, 23, 26, 1, 1, 41, 1, 1, 35, 27, 1, 1, 34, 43, 37, 1, 1, 49, 1, 1, 55, 33, 51, 43, 1, 35, 47, 41, 1, 55, 1, 1, 49, 39, 43, 53
Offset: 3
-
lkn[n_]:=Module[{k=n-2},While[PowerMod[k,2,n]!=1,k--];k]; Array[lkn,80,3] (* Harvey P. Dale, Sep 01 2023 *)
-
a(n) = forstep(k=n-2, 1, -1, if ((gcd(k, n) == 1) && (lift(Mod(1,n)/k) == k), return(k));); \\ Michel Marcus, Oct 25 2022
-
rootsOfUnity(p,e,pe=p^e)=if(p>2, return(Mod([1,-1],pe))); if(e==1, return(Mod([1],2))); if(e==2, return(Mod([1,3],4))); Mod([1,pe/2-1,pe/2+1,-1],pe)
a(n,f=factor(n))=my(v=apply(x->rootsOfUnity(x[1],x[2]),Col(f)),r,t); forvec(u=vector(#v,i,[1,#v[i]]), t=lift(chinese(vector(#u,i,v[i][u[i]]))); if(t>r && tCharles R Greathouse IV, Oct 26 2022
-
def a(n):
for k in range(n - 2, 0, -1):
if pow(k,2,n) == 1: return k
-
from sympy.ntheory import sqrt_mod_iter
def A358016(n): return max(filter(lambda k: k<=n-2,sqrt_mod_iter(1,n))) # Chai Wah Wu, Oct 26 2022
A387317
Number of good involutions of all nontrivial linear quandles of order n.
Original entry on oeis.org
1, 4, 1, 2, 1, 44, 1, 2, 1, 414, 1, 2, 31, 5784, 1, 2, 1, 97358, 237, 2, 1, 1917064, 1, 2, 1, 42406158, 1
Offset: 3
- Seiichi Kamada, Quandles with good involutions, their homologies and knot invariants, Intelligence of Low Dimensional Topology 2006, World Scientific Publishing Co. Pte. Ltd., 2007, 101-108.
Some terms corrected by
Luc Ta, Sep 03 2025
A114811
Number of real, weakly primitive Dirichlet characters modulo n.
Original entry on oeis.org
1, 1, 2, 1, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 4, 0, 2, 0, 2, 2, 4, 2, 2, 4, 0, 2, 0, 2, 2, 4, 2, 0, 4, 2, 4, 0, 2, 2, 4, 4, 2, 4, 2, 2, 0, 2, 2, 0, 0, 0, 4, 2, 2, 0, 4, 4, 4, 2, 2, 4, 2, 2, 0, 0, 4, 4, 2, 2, 4, 4, 2, 0, 2, 2, 0, 2, 4, 4, 2, 0, 0, 2, 2, 4, 4, 2, 4, 4, 2, 0, 4, 2, 4, 2, 4, 0, 2, 0, 0, 0, 2, 4, 2, 4, 8
Offset: 1
The function chi defined on the integers by chi(1)=1, chi(5)=-1 and chi(2)=chi(3)=chi(4)=chi(6)=0 [and extended periodically] is a weakly primitive character mod 6, but not mod 12 or mod 18. In this sense, we eliminate the "overcounting" of real Dirichlet characters in A060594.
-
rad[n_] := Times @@ First /@ FactorInteger[n]; A055231[n_] := Denominator[ n/rad[n]^2 ]; A114643[n_] := Sum[ MoebiusMu[n/d] * Sum[ If[ Mod[i^2 - 1, d] == 0, 1, 0], {i, 2, d}], {d, Divisors[n] } ]; A114643[1] = 1; a[n_] := Sum[ A114643[n/d], {d, Divisors[ A055231[n] ] } ]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jun 20 2013 *)
f[p_, e_] := 0; f[p_, 1] = 2; f[2, e_] := 0; f[2, 1] = f[2, 2] = 1; f[2, 3] = 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 11 2023 *)
-
A055231(n) = {my(f=factor(n)); for (k=1, #f~, if (f[k, 2] > 1, f[k, 2] = 0); ); factorback(f); } \\ From A055231
A114643(n) = sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^2-1)%d, 0, 1)), 0)); \\ From A114643
A114811(n) = sumdiv(A055231(n),d,A114643(n/d)); \\ Antti Karttunen, Sep 27 2018
-
A114811(n) = { my(f=factor(n)); for(i=1,#f~,if(2==f[i,1],if(f[i,2]<3,f[i,2]=0,if(3==f[i,2],f[i,2]=1,f[i,1]=0)),if(f[i,2]>1,f[i,1]=0,f[i,1]=2))); factorback(f); }; \\ Antti Karttunen, Sep 27 2018, after Steven Finch's multiplicative formula.
A185278
Number of isomorphism classes of generalized Petersen graphs G(n,k) on 2n vertices with gcd(n,k) = 1.
Original entry on oeis.org
1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 2, 3, 3, 5, 2, 5, 3, 4, 3, 6, 4, 6, 4, 5, 4, 8, 3, 8, 5, 6, 5, 7, 4, 10, 5, 7, 6, 11, 4, 11, 6, 7, 6, 12, 6, 11, 6, 9, 7, 14, 5, 11, 8, 10, 8, 15, 6, 16, 8, 10, 9, 14, 6, 17, 9, 12, 7, 18, 8, 19, 10, 11, 10, 16, 7, 20, 10, 14, 11, 21, 8, 18, 11, 15, 12, 23, 7, 19, 12, 16, 12, 19, 10, 25, 11, 16, 11
Offset: 3
A300915
Order of the group PSL(2,Z_n).
Original entry on oeis.org
1, 6, 12, 24, 60, 72, 168, 96, 324, 360, 660, 288, 1092, 1008, 720, 768, 2448, 1944, 3420, 1440, 2016, 3960, 6072, 1152, 7500, 6552, 8748, 4032, 12180, 4320, 14880, 6144, 7920, 14688, 10080, 7776, 25308, 20520, 13104, 5760
Offset: 1
-
n := 2; nn = 40; \[Gamma][n_, q_] := Product[q^n - q^i, {i, 0, n - 1}]; Prepend[ Table[Product[ FactorInteger[m][[All, 1]][[j]]^(n^2 (FactorInteger[m][[All, 2]][[j]] - 1)) \[Gamma][n,FactorInteger[m][[All, 1]][[j]]], {j, 1, PrimeNu[m]}], {m, 2, nn}]/Table[EulerPhi[m], {m, 2, nn}]/ Table[Count[Mod[Select[Range[m], GCD[#, m] == 1 &]^n, m], 1], {m, 2, nn}], 1]
f[p_, e_] := (p^2-1)*p^(3*e-2)/2; f[2, e_] := Switch[e, 1, 6, 2, 24, , 3*2^(3*e-4)]; a[1] = 1; a[n] := Times @@ f @@@ FactorInteger[n]; Array[a, 40] (* Amiram Eldar, Dec 01 2022 *)
-
a(n) = {my(f=factor(n)); prod(i=1, #f~, my([p,e]=f[i,]); (p^2-1)*p^(3*e-2)/if(p==2, 2^min(2, e-1), 2))} \\ Andrew Howroyd, Aug 01 2018
Comments