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-5 of 5 results.

A212957 A(n,k) is the number of moduli m such that the multiplicative order of k mod m equals n; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 2, 2, 1, 0, 3, 2, 2, 2, 0, 2, 5, 4, 6, 1, 0, 4, 2, 3, 4, 4, 3, 0, 2, 6, 2, 12, 6, 10, 1, 0, 4, 4, 8, 4, 9, 16, 2, 4, 0, 3, 6, 2, 26, 4, 37, 6, 14, 2, 0, 4, 3, 12, 18, 4, 10, 3, 8, 4, 5, 0, 2, 12, 5, 14, 6, 42, 2, 28, 26, 16, 3, 0
Offset: 1

Views

Author

Alois P. Heinz, Jun 01 2012

Keywords

Examples

			A(4,3) = 6: 3^4 = 81 == 1 (mod m) for m in {5,10,16,20,40,80}.
Square array A(n,k) begins:
  0,  1,  2,  2,  3,  2,  4,  2, ...
  0,  1,  2,  2,  5,  2,  6,  4, ...
  0,  1,  2,  4,  3,  2,  8,  2, ...
  0,  2,  6,  4, 12,  4, 26, 18, ...
  0,  1,  4,  6,  9,  4,  4,  6, ...
  0,  3, 10, 16, 37, 10, 42, 24, ...
  0,  1,  2,  6,  3,  2, 12, 10, ...
  0,  4, 14,  8, 28,  8, 48, 72, ...
		

Crossrefs

Main diagonal gives A252760.

Programs

  • Maple
    with(numtheory):
    A:= (n, k)-> add(mobius(n/d)*tau(k^d-1), d=divisors(n)):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..15);
  • Mathematica
    a[n_, k_] := Sum[ MoebiusMu[n/d] * DivisorSigma[0, k^d - 1], {d, Divisors[n]}]; a[1, 1] = 0; Table[ a[n - k + 1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 12 2012 *)
  • PARI
    a(n, k) = if(k == 1, 0, sumdiv(n, d, moebius(n/d) * numdiv(k^d-1))); \\ Amiram Eldar, Jan 25 2025

Formula

A(n,k) = |{m : multiplicative order of k mod m = n}|.
A(n,k) = Sum_{d|n} mu(n/d)*tau(k^d-1), mu = A008683, tau = A000005.

A059911 a(n) = |{m : multiplicative order of n mod m = 6}|.

Original entry on oeis.org

0, 3, 10, 16, 37, 10, 42, 24, 58, 53, 164, 26, 68, 38, 32, 68, 169, 22, 222, 38, 42, 50, 328, 40, 180, 219, 108, 26, 334, 82, 460, 82, 92, 72, 220, 108, 449, 86, 128, 80, 192, 22, 336, 110, 222, 218, 540, 84, 778, 129, 150, 80, 270, 54, 328, 356, 132, 68, 348, 22
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 2001

Keywords

Comments

The multiplicative order of a mod m, gcd(a,m) = 1, is the smallest natural number d for which a^d = 1 (mod m).

Examples

			a(2) = |{9,21,63}| = 3, a(3) = |{7,14,28,52,56,91,104,182,364,728}| = 10, a(4) = |{13,35,39,45,65,91,105,117,195,273,315,455,585,819,1365,4095}| = 16,...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[{1, -1, -1, 1} * DivisorSigma[0, n^{6, 3, 2, 1} - 1]]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jan 25 2025*)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^6-1) - numdiv(n^3-1) - numdiv(n^2-1) + numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^6-1)-tau(n^3-1)-tau(n^2-1)+tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A059908 a(n) = |{m : multiplicative order of n mod m = 3}|.

Original entry on oeis.org

0, 1, 2, 4, 3, 2, 8, 2, 12, 5, 12, 2, 12, 2, 4, 20, 5, 6, 10, 2, 6, 14, 12, 2, 40, 9, 4, 6, 18, 10, 16, 6, 6, 8, 12, 12, 39, 2, 12, 8, 8, 6, 16, 6, 18, 26, 12, 6, 50, 3, 18, 8, 18, 2, 32, 12, 8, 20, 4, 6, 60, 2, 12, 26, 21, 4, 64, 10, 6, 8, 8, 6, 20, 14, 4, 12, 6, 4, 64, 2, 70, 7, 12, 6, 24
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 2001

Keywords

Comments

The multiplicative order of a mod m, gcd(a,m) = 1, is the smallest natural number d for which a^d = 1 (mod m).

Examples

			a(2) = |{7}| = 1, a(3) = |{13,26}| = 2, a(4) = |{7,9,21,63}| = 4, a(5) = |{31,62,124}| = 3, a(6) = |{43,215}| = 2, a(7) = |{9,18,19,38,57,114,171,342}| = 8,...
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0,n^3-1]-DivisorSigma[0,n-1],{n,90}] (* Harvey P. Dale, Feb 03 2015 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^3-1) - numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^3-1)-tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A059909 a(n) = |{m : multiplicative order of n mod m = 4}|.

Original entry on oeis.org

0, 2, 6, 4, 12, 4, 26, 18, 14, 6, 24, 12, 64, 8, 16, 8, 66, 20, 36, 8, 64, 24, 76, 6, 28, 12, 64, 24, 48, 12, 100, 40, 50, 48, 36, 8, 96, 40, 28, 8, 104, 12, 208, 36, 24, 36, 200, 18, 48, 36, 36, 24, 128, 8, 152, 16, 172, 24, 48, 12, 48, 36, 56, 72, 40, 8, 128, 56, 48, 40
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 2001

Keywords

Comments

The multiplicative order of a mod m, gcd(a,m) = 1, is the smallest natural number d for which a^d = 1 (mod m).

Examples

			a(2) = |{5, 15}| = 2, a(3) = |{5, 10, 16, 20, 40, 80}| = 6, a(4) = |{17, 51, 85, 255}| = 4, a(5) = |{13, 16, 26, 39, 48, 52, 78, 104, 156, 208, 312, 624}| = 12, ...
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0,n^4-1]-DivisorSigma[0,n^2-1],{n,70}] (* Harvey P. Dale, Nov 30 2011 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^4-1) - numdiv(n^2-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^4-1)-tau(n^2-1), where tau(n) = number of divisors of n A000005. More generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A059910 a(n) = |{m : multiplicative order of n mod m = 5}|.

Original entry on oeis.org

0, 1, 4, 6, 9, 4, 4, 6, 20, 9, 8, 2, 6, 6, 12, 44, 5, 6, 18, 14, 12, 4, 4, 2, 56, 13, 20, 4, 6, 2, 40, 6, 18, 12, 12, 44, 63, 6, 28, 4, 16, 14, 8, 2, 18, 12, 28, 14, 70, 3, 42, 12, 42, 6, 24, 8, 56, 44, 60, 6, 60, 2, 4, 90, 21, 20, 24, 2, 18, 60, 88, 6, 12, 2, 28, 26, 6, 28, 8, 14, 170
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 2001

Keywords

Comments

The multiplicative order of a mod m, gcd(a,m) = 1, is the smallest natural number d for which a^d = 1 (mod m).

Crossrefs

Programs

  • Mathematica
    a[n_] := Subtract @@ DivisorSigma[0, {n^5-1, n-1}]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jan 25 2025 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^5-1) - numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^5-1)-tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.
Showing 1-5 of 5 results.