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 A046798 #76 Mar 15 2025 13:50:47 %S A046798 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, %T A046798 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, %U A046798 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 %N A046798 Number of divisors of 2^n + 1. %C A046798 a(n) is odd iff n = 3, as a consequence of the Catalan-Mihăilescu theorem. - _Bernard Schott_, Oct 05 2021 %H A046798 Max Alekseyev, <a href="/A046798/b046798.txt">Table of n, a(n) for n = 0..1128</a> (terms 0..500 from T. D. Noe, terms 501..1062 from Amiram Eldar, term 1108 from Tyler Busby) %H A046798 Wikipedia, <a href="https://en.wikipedia.org/wiki/Catalan%27s_conjecture">Catalan's conjecture</a>. %F A046798 a(n) = A000005(A000051(n)). - _Michel Marcus_, Mar 18 2017 %e A046798 a(7)=4, because 2^7 + 1 = 129 has 4 divisors. %p A046798 a:= n-> numtheory[tau](2^n+1): %p A046798 seq(a(n), n=0..100); # _Alois P. Heinz_, Aug 23 2021 %t A046798 A046798[n_IntegerQ]:=DivisorSigma[0,1+2^n]; (* _Enrique Pérez Herrero_, Nov 09 2010 *) %t A046798 DivisorSigma[0, 1 + 2^#] & /@ Range[0, 83] (* _Jayanta Basu_, Jun 29 2013 *) %t A046798 Table[DivisorSigma[0, 2^n + 1], {n, 0, 100}] (* _Vincenzo Librandi_, Feb 05 2018 *) %o A046798 (PARI) a(n) = numdiv(2^n+1); \\ _Michel Marcus_, Mar 18 2017 %o A046798 (Python) %o A046798 from sympy.ntheory import divisor_count %o A046798 def A046798(n): return divisor_count(2**n + 1) # _Indranil Ghosh_, Mar 18 2017 %o A046798 (Magma) [NumberOfDivisors(2^n+1): n in [0..100]]; // _Vincenzo Librandi_, Feb 05 2018 %Y A046798 Cf. A000005, A000051, A002587, A002589, A046801, A054992, A057957, A059886, A274906, A344897. %K A046798 nonn %O A046798 0,1 %A A046798 _Labos Elemer_