[go: up one dir, main page]

login
A046798
Number of divisors of 2^n + 1.
21
2, 2, 2, 3, 2, 4, 4, 4, 2, 8, 6, 4, 4, 4, 8, 12, 2, 4, 16, 4, 4, 12, 8, 4, 8, 16, 16, 20, 4, 8, 48, 4, 4, 24, 16, 32, 16, 8, 16, 12, 4, 8, 64, 4, 8, 64, 32, 8, 8, 8, 64, 48, 8, 8, 64, 48, 8, 24, 8, 16, 16, 4, 32, 64, 4, 64, 64, 8, 12, 24, 96, 8, 32, 8, 32, 96, 16, 64, 768, 4, 8, 192, 32, 64
OFFSET
0,1
COMMENTS
a(n) is odd iff n = 3, as a consequence of the Catalan-Mihăilescu theorem. - Bernard Schott, Oct 05 2021
LINKS
Max Alekseyev, Table of n, a(n) for n = 0..1122 (terms 0..500 from T. D. Noe, terms 501..1062 from Amiram Eldar, term 1108 from Tyler Busby)
FORMULA
a(n) = A000005(A000051(n)). - Michel Marcus, Mar 18 2017
EXAMPLE
a(7)=4, because 2^7 + 1 = 129 has 4 divisors.
MAPLE
a:= n-> numtheory[tau](2^n+1):
seq(a(n), n=0..100); # Alois P. Heinz, Aug 23 2021
MATHEMATICA
A046798[n_IntegerQ]:=DivisorSigma[0, 1+2^n]; (* Enrique Pérez Herrero, Nov 09 2010 *)
DivisorSigma[0, 1 + 2^#] & /@ Range[0, 83] (* Jayanta Basu, Jun 29 2013 *)
Table[DivisorSigma[0, 2^n + 1], {n, 0, 100}] (* Vincenzo Librandi, Feb 05 2018 *)
PROG
(PARI) a(n) = numdiv(2^n+1); \\ Michel Marcus, Mar 18 2017
(Python)
from sympy.ntheory import divisor_count
def A046798(n): return divisor_count(2**n + 1) # Indranil Ghosh, Mar 18 2017
(Magma) [NumberOfDivisors(2^n+1): n in [0..100]]; // Vincenzo Librandi, Feb 05 2018
KEYWORD
nonn
AUTHOR
STATUS
approved