A059892 a(n) = |{m : multiplicative order of 10 mod m is equal to n}|.
3, 3, 5, 6, 9, 53, 9, 36, 12, 33, 9, 186, 21, 33, 111, 144, 9, 564, 3, 330, 239, 273, 3, 1756, 84, 165, 76, 714, 93, 16167, 21, 5952, 111, 177, 363, 4288, 21, 15, 99, 5724, 45, 48807, 45, 4314, 1140, 183, 9, 14192, 36, 2940, 495, 1338, 45, 11572, 747, 11484
Offset: 1
Crossrefs
Programs
-
Maple
with(numtheory): a:= n-> add(mobius(n/d)*tau(10^d-1), d=divisors(n)): seq(a(n), n=1..30); # Alois P. Heinz, Oct 12 2012
-
Mathematica
f[n_, d_] := MoebiusMu[n/d]*Length[Divisors[10^d - 1]]; a[n_] := Total[(f[n, #] & ) /@ Divisors[n]]; Table[a[n], {n, 1, 56}] (* Jean-François Alcover, Mar 21 2011 *)
-
PARI
j=[]; for(n=1,10,j=concat(j,sumdiv(n,d,moebius(n/d)*numdiv(10^d-1)))); j
-
Python
from sympy import divisors, mobius, divisor_count def a(n): return sum(mobius(n//d)*divisor_count(10**d - 1) for d in divisors(n)) # Indranil Ghosh, Apr 23 2017
Formula
Extensions
More terms from Jason Earls, Aug 06 2001.
Terms to a(280) in b-file from T. D. Noe, Oct 01 2013
a(281)-a(322) in b-file from Ray Chandler, May 03 2017
a(323)-a(352) in b-file from Max Alekseyev, May 03 2022
Comments