login
Number of divisors of 2^n-1.
29

%I #48 Mar 13 2023 11:57:30

%S 1,2,2,4,2,6,2,8,4,8,4,24,2,8,8,16,2,32,2,48,12,16,4,96,8,8,8,64,8,96,

%T 2,32,16,8,16,512,4,8,16,192,4,144,8,128,64,16,8,768,4,128,32,128,8,

%U 160,64,256,16,64,4,4608,2,8,96,128,8,384,4,128,16,512,8,8192,8,32,128

%N Number of divisors of 2^n-1.

%C a(0) cannot be defined because 0's divisors are an infinite set (every number is a divisor of 0.)

%H Amiram Eldar, <a href="/A046801/b046801.txt">Table of n, a(n) for n = 1..1206</a> (terms 1..500 from T. D. Noe)

%e a(120) = 73728 since 2^120-1 has that many divisors.

%p a:= n-> numtheory[tau](2^n-1):

%p seq(a(n), n=1..80); # _Alois P. Heinz_, Aug 23 2021

%t Table[DivisorSigma[0, 2^n - 1], {n, 120}] (* _Michael De Vlieger_, Mar 26 2015 *)

%o (PARI) a(n) = numdiv(2^n-1); \\ _Michel Marcus_, Dec 15 2013

%o (Magma) [DivisorSigma(0, 2^n - 1): n in [1..100]]; // _Vincenzo Librandi_, Mar 27 2015

%o (Python)

%o from sympy import divisor_count

%o def A046801(n): return divisor_count((1<<n)-1) # _Chai Wah Wu_, Mar 13 2023

%Y Cf. A000043 (n such that a(n) = 2), A000225 (2^n-1).

%K nonn

%O 1,2

%A _Labos Elemer_

%E Typo in example fixed by _Reinhard Zumkeller_, May 15 2010

%E a(0) removed by _J. Lowell_, Mar 26 2015