login
Number of divisors of 2*n-1.
38

%I #43 Nov 27 2022 02:08:33

%S 1,2,2,2,3,2,2,4,2,2,4,2,3,4,2,2,4,4,2,4,2,2,6,2,3,4,2,4,4,2,2,6,4,2,

%T 4,2,2,6,4,2,5,2,4,4,2,4,4,4,2,6,2,2,8,2,2,4,2,4,6,4,3,4,4,2,4,2,4,8,

%U 2,2,4,4,4,6,2,2,6,4,2,4,4,2,8,2,3,6,2,6,4,2,2,4,4,4,8,2,2,8,2,2,4,4,4,6,4

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

%H Seiichi Manyama, <a href="/A099774/b099774.txt">Table of n, a(n) for n = 1..10000</a>

%F G.f.: Sum_{k>0} x^k/(1-x^(2*k-1)). - _Michael Somos_, Sep 02 2006

%F G.f.: sum(k>=1, x^((2*k-1)^2/2+1/2) * (1+x^(2*k-1))/(1-x^(2*k-1)) ). - _Joerg Arndt_, Nov 08 2010

%F Dirichlet g.f. (with interpolated zeros): zeta(s)^2*(1-1/2^s)^2. - _Geoffrey Critzer_, Feb 15 2015

%F Sum_{k=1..n} a(k) ~ (n*log(n) + (2*gamma - 1 + 3*log(2))*n)/2, where gamma is Euler's constant (A001620). - _Amiram Eldar_, Nov 27 2022

%e a(5)=3 because the divisors of 9 are: 1, 3 and 9.

%p with(numtheory): seq(tau(2*n-1),n=1..120);

%t nn = 200;

%t f[list_, i_] := list[[i]];a =Table[Boole[OddQ[n]], {n, 1, nn}];Select[Table[DirichletConvolve[f[a,n], f[a, n], n, m], {m, 1, nn}], # > 0 &] (* _Geoffrey Critzer_, Feb 15 2015 *)

%t Table[DivisorSigma[0, 2*n-1], {n, 1, 100}] (* _Vaclav Kotesovec_, Jan 14 2019 *)

%o (PARI) {a(n)=if(n<1, 0, numdiv(2*n-1))} /* _Michael Somos_, Sep 03 2006 */

%o (Haskell)

%o a099774 = a000005 . a005408 -- _Reinhard Zumkeller_, Sep 22 2014

%o (Magma) [NumberOfDivisors(2*n+1): n in [0..100]]; // _Vincenzo Librandi_, Mar 18 2015

%o (GAP) List([1..120],n->Tau(2*n-1)); # _Muniru A Asiru_, Dec 21 2018

%Y Bisection of A000005.

%Y Cf. A000005, A001620, A099777.

%Y Cf. A005408, A008438.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Nov 19 2004

%E More terms from _Emeric Deutsch_, Dec 03 2004