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.
%I A212957 #29 Jan 26 2025 02:17:33 %S A212957 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, %T A212957 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, %U A212957 4,5,0,2,12,5,14,6,42,2,28,26,16,3,0 %N 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. %H A212957 Alois P. Heinz, <a href="/A212957/b212957.txt">Antidiagonals n = 1..60</a> %H A212957 Wikipedia, <a href="https://en.wikipedia.org/wiki/Multiplicative_order">Multiplicative order</a>. %F A212957 A(n,k) = |{m : multiplicative order of k mod m = n}|. %F A212957 A(n,k) = Sum_{d|n} mu(n/d)*tau(k^d-1), mu = A008683, tau = A000005. %e A212957 A(4,3) = 6: 3^4 = 81 == 1 (mod m) for m in {5,10,16,20,40,80}. %e A212957 Square array A(n,k) begins: %e A212957 0, 1, 2, 2, 3, 2, 4, 2, ... %e A212957 0, 1, 2, 2, 5, 2, 6, 4, ... %e A212957 0, 1, 2, 4, 3, 2, 8, 2, ... %e A212957 0, 2, 6, 4, 12, 4, 26, 18, ... %e A212957 0, 1, 4, 6, 9, 4, 4, 6, ... %e A212957 0, 3, 10, 16, 37, 10, 42, 24, ... %e A212957 0, 1, 2, 6, 3, 2, 12, 10, ... %e A212957 0, 4, 14, 8, 28, 8, 48, 72, ... %p A212957 with(numtheory): %p A212957 A:= (n, k)-> add(mobius(n/d)*tau(k^d-1), d=divisors(n)): %p A212957 seq(seq(A(n, 1+d-n), n=1..d), d=1..15); %t A212957 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 *) %o A212957 (PARI) a(n, k) = if(k == 1, 0, sumdiv(n, d, moebius(n/d) * numdiv(k^d-1))); \\ _Amiram Eldar_, Jan 25 2025 %Y A212957 Columns k=1-10 give: A000004, A059499, A059885, A059886, A059887, A059888, A059889, A059890, A059891, A059892. %Y A212957 Rows n=1-10 give: A000005, A059907, A059908, A059909, A059910, A059911, A218256, A218257, A218258, A218259. %Y A212957 Main diagonal gives A252760. %Y A212957 Cf. A000005, A008683. %K A212957 nonn,tabl %O A212957 1,4 %A A212957 _Alois P. Heinz_, Jun 01 2012