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-2 of 2 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.

A038138 Order of n (mod 7).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [Modorder(n,7): n in [0..110]]; // Bruno Berselli, Mar 22 2016
    
  • Mathematica
    ReplacePart[Table[MultiplicativeOrder[n, 7], {n, 105}], List /@ Range[7, 105, 7] -> 0] (* Alonso del Arte, Mar 23 2016 *)
    PadRight[{},120,{0,1,3,6,3,6,2}] (* Harvey P. Dale, Apr 26 2020 *)
  • PARI
    a(n) = if (n % 7, znorder(Mod(n, 7)), 0); \\ Michel Marcus, Mar 22 2016
    
  • PARI
    x='x+O('x^200); concat(0, Vec(x*(1+3*x+6*x^2+3*x^3+6*x^4+2*x^5)/(1-x^7))) \\ Altug Alkan, Mar 23 2016

Formula

G.f.: x*(1 + 3*x + 6*x^2 + 3*x^3 + 6*x^4 + 2*x^5)/(1 - x^7). - Bruno Berselli, Mar 22 2016
a(n) = -(35*(n mod 7)^6 - 603*(n mod 7)^5 + 3860*(n mod 7)^4 - 11235*(n mod 7)^3 + 14465*(n mod 7)^2 - 6882*(n mod 7))/360. - Luce ETIENNE, Oct 20 2017

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 04 2000
Showing 1-2 of 2 results.