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.

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.