A046798 Number of divisors of 2^n + 1.
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
Keywords
Examples
a(7)=4, because 2^7 + 1 = 129 has 4 divisors.
Links
- Max Alekseyev, Table of n, a(n) for n = 0..1128 (terms 0..500 from T. D. Noe, terms 501..1062 from Amiram Eldar, term 1108 from Tyler Busby)
- Wikipedia, Catalan's conjecture.
Crossrefs
Programs
-
Magma
[NumberOfDivisors(2^n+1): n in [0..100]]; // Vincenzo Librandi, Feb 05 2018
-
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 *)
-
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
Comments