A357001 a(n) = A002729(n) - A357000(n) - 1.
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 43, 0, 12, 0, 0, 0, 0, 0, 1954, 8, 0, 342, 0, 0, 0, 0
Offset: 1
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.
a[m_, n_] := (1/EulerPhi[n])*Sum[If[GCD[k, n] == 1, m^DivisorSum[n, EulerPhi[#] / MultiplicativeOrder[k, #]&], 0], {k, n}]; Table[a[2, n], {n, 34}] (* Jean-François Alcover, Dec 04 2015 *)
{ a(n) = sum(k=1,n, if(gcd(k,n)==1, 2^sumdiv(n,d,eulerphi(d)/znorder(Mod(k,d))), 0); ) / eulerphi(n) } /* Max Alekseyev, Jun 18 2007 */
Table starts: 1 1 1 1 1 1 1 1 1 1 ... 2 3 4 6 6 13 10 24 22 45 ... 3 6 10 21 24 92 78 327 443 1632 ... 4 10 20 55 76 430 460 2605 5164 26962 ... 5 15 35 120 201 1505 2015 14070 37085 246753 ... 6 21 56 231 462 4291 6966 57561 188866 1519035 ... 7 28 84 406 952 10528 20140 192094 752087 7079800 ... ...
IsLeastPoint[s_, f_] := Module[{t=f[s]}, While[t>s, t=f[t]]; Boole[s==t]]; c[n_, k_, t_] := Sum[IsLeastPoint[u, Mod[#*k+t, n]&], {u, 0, n-1}]; a[n_, x_] := Sum[If[GCD[k, n] == 1, x^c[n, k, t], 0], {t, 0, n-1}, {k, 1, n}] / (n*EulerPhi[n]); Table[a[n-m+1, m], {n, 1, 11}, {m, 1, n}] // Flatten (* Jean-François Alcover, Jun 05 2017, translated from PARI *)
IsLeastPoint(s,f)={my(t=f(s)); while(t>s,t=f(t));s==t} C(n,k,t)=sum(u=0,n-1,IsLeastPoint(u,v->(v*k+t)%n)); a(n,x)=sum(t=0, n-1, sum(k=1, n, if (gcd(k, n)==1, x^C(n,k,t),0)))/(n * eulerphi(n)); for(m=1, 7, for(n=1, 10, print1( a(n,m), ", ") ); print(); );
M[j_, L_] := Module[{m=1}, While[Sum[j^i, {i, 0, m-1}] ~Mod~ L != 0, m++]; m]; c[j_, t_, n_] := Sum[1/M[j, n/GCD[n, u*(j-1)+t]], {u, 0, n-1}]; CB[n_, k_] = If [n==1, k, 1/(n*EulerPhi[n])*Sum[If[1==GCD[n, j], k^c[j, t, n], 0], {t, 0, n-1}, {j, 1, n-1}]]; Table[Print[cb = CB[n, 3]]; cb, {n, 1, 35}] (* Jean-François Alcover, Dec 04 2015, after Joerg Arndt *)
\\ see p.3 of the Dokovic et al. reference M(j, L)={my(m=1); while ( sum(i=0, m-1, j^i) % L != 0, m+=1 ); m; } c(j, t, n)=sum(u=0,n-1, 1/M(j, n / gcd(n, u*(j-1)+t) ) ); CB(n, k)=if (n==1,k, 1/(n*eulerphi(n)) * sum(t=0,n-1, sum(j=1,n-1, if(1==gcd(n,j), k^c(j,t,n), 0) ) ) ); for(n=1, 66, print1(CB(n,3),", ")); \\ second argument k=3, 4, 5, 6 respectively gives A056411, A056412, A056413, A056414. \\ Joerg Arndt, Aug 27 2014
M[j_, L_] := Module[{m = 1}, While[Sum[j^i, {i, 0, m-1}] ~Mod~ L != 0, m++]; m]; c[j_, t_, n_] := Sum[1/M[j, n / GCD[n, u*(j-1) + t]], {u, 0, n - 1}]; CB[n_, k_] = If[n==1, k, 1/(n*EulerPhi[n]) * Sum[ If[1 == GCD[n, j], k^c[j, t, n], 0] , {t, 0, n-1}, {j, 1, n-1}]]; Table[Print[cb = CB[n, 4]]; cb, {n, 1, 30}] (* Jean-François Alcover, Dec 04 2015, after Joerg Arndt *)
\\ see p.3 of the Dokovic et al. reference M(j, L)={my(m=1); while ( sum(i=0, m-1, j^i) % L != 0, m+=1 ); m; } c(j, t, n)=sum(u=0,n-1, 1/M(j, n / gcd(n, u*(j-1)+t) ) ); CB(n, k)=if (n==1,k, 1/(n*eulerphi(n)) * sum(t=0,n-1, sum(j=1,n-1, if(1==gcd(n,j), k^c(j,t,n), 0) ) ) ); for(n=1, 66, print1(CB(n,4),", ")); \\ Joerg Arndt, Aug 27 2014
M[j_, L_] := Module[{m = 1}, While[Sum[ j^i, {i, 0, m - 1}] ~Mod~ L != 0, m++]; m]; c[j_, t_, n_] := Sum[ 1/M[j, n / GCD[n, u*(j - 1) + t] ], {u, 0, n - 1} ]; CB[n_, k_] = If [n == 1, k, 1/(n*EulerPhi[n]) * Sum[ If[1 == GCD[n, j], k^c[j, t, n], 0] , {t, 0, n-1}, {j, 1, n-1}]]; Table[ Print[ cb = CB[n, 5]]; cb, {n, 1, 28}] (* Jean-François Alcover, Dec 04 2015, after Joerg Arndt *)
\\ see p.3 of the Dokovic et al. reference M(j, L)={my(m=1); while ( sum(i=0, m-1, j^i) % L != 0, m+=1 ); m; } c(j, t, n)=sum(u=0,n-1, 1/M(j, n / gcd(n, u*(j-1)+t) ) ); CB(n, k)=if (n==1,k, 1/(n*eulerphi(n)) * sum(t=0,n-1, sum(j=1,n-1, if(1==gcd(n,j), k^c(j,t,n), 0) ) ) ); for(n=1, 66, print1(CB(n,5),", ")); \\ Joerg Arndt, Aug 27 2014
M[j_, L_] := Module[{m = 1}, While[Sum[ j^i, {i, 0, m - 1}] ~Mod~ L != 0, m++]; m]; c[j_, t_, n_] := Sum[ 1/M[j, n / GCD[n, u*(j - 1) + t] ], {u, 0, n - 1}]; CB[n_, k_] = If[n == 1, k, 1/(n*EulerPhi[n]) * Sum[ If[1 == GCD[n, j], k^c[j, t, n], 0], {t, 0, n-1}, {j, 1, n-1}]]; Table[ Print[ cb = CB[n, 6]]; cb, {n, 1, 27}] (* Jean-François Alcover, Dec 04 2015, after Joerg Arndt *)
\\ see p.3 of the Dokovic et al. reference M(j, L)={my(m=1); while ( sum(i=0, m-1, j^i) % L != 0, m+=1 ); m; } c(j, t, n)=sum(u=0,n-1, 1/M(j, n / gcd(n, u*(j-1)+t) ) ); CB(n, k)=if (n==1,k, 1/(n*eulerphi(n)) * sum(t=0,n-1, sum(j=1,n-1, if(1==gcd(n,j), k^c(j,t,n), 0) ) ) ); for(n=1, 66, print1(CB(n,6),", ")); \\ Joerg Arndt, Aug 27 2014
Table starts: \n 1 2 3 4 5 6 7 8 9 10 m\ --------------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1 1 ... 2 | 1 2 3 6 6 20 14 48 52 140 ... 3 | 1 3 6 18 24 135 130 648 1137 4995 ... 4 | 1 4 10 40 70 544 700 4480 11056 65824 ... 5 | 1 5 15 75 165 1625 2635 20625 65425 489125 ... 6 | 1 6 21 126 336 3996 7826 72576 280596 2521476 ... ... Case n=10: Only 1, 3, 7, 9 are prime to 10. Multiplication modulo 10 is described by the following multiplication table. 1, 2, 3, 4, 5, 6, 7, 8, 9 => (1)(2)(3)(4)(5)(6)(7)(8)(9) => m^9 3, 6, 9, 2, 5, 8, 1, 4, 7 => (1397)(2684)(5) => m^3 7, 4, 1, 8, 5, 2, 9, 6, 3 => (1793)(2486)(5) => m^3 9, 8, 7, 6, 5, 4, 3, 2, 1 => (19)(28)(37)(46)(5) => m^5 Each row of the multiplication table can be viewed as a permutation and together these form a commutative group on 4 elements. In this case the group is isomorphic to the cyclic group C_4. Each permutation can be represented in cycle notation. (shown above to the right of the corresponding multiplication table row). In order to count the equivalence classes using Polya's enumeration theorem only the number of cycles in each permutation is needed. This gives the cycle index polynomial (1/4)*(m^9 + m^5 + 2*m^3). Putting m = 1..4 gives 1, 140, 4995, 65824.
A132191[m_, n_] := (1/EulerPhi[n])*Sum[If[GCD[k, n] == 1, m^DivisorSum[n, EulerPhi[#] / MultiplicativeOrder[k, #] &], 0], {k, 1, n}]; T[m_, n_] := A132191[m, n]/m; Table[T[m - n + 1, n], {m, 1, 11}, {n, m, 1, -1}] // Flatten (* Jean-François Alcover, Jun 06 2017 *)
a(n,x)=sum(k=1, n, if(gcd(k, n)==1, x^(sumdiv(n, d, eulerphi(d)/znorder(Mod(k, d)))-1), 0))/eulerphi(n); for(m=1, 6, for(n=1, 10, print1( a(n,m), ", ") ); print(); );
Comments