A001877 Number of divisors of n of the form 5k+2; a(0) = 0.
0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 0, 2, 0, 1, 1, 1, 0, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 1, 0, 2, 0, 2, 1, 2, 1, 1, 0, 1, 0, 3, 0, 2, 0, 1, 1, 2, 1, 1, 1, 2, 0, 2, 0, 2, 1, 1, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 3, 0, 2, 0, 1, 2, 1, 0, 1, 1, 2, 0, 4, 1, 1, 1
Offset: 0
Links
- T. D. Noe, Table of n, a(n) for n = 0..10000
- R. A. Smith and M. V. Subbarao, The average number of divisors in an arithmetic progression, Canadian Mathematical Bulletin, Vol. 24, No. 1 (1981), pp. 37-41.
Programs
-
Mathematica
Join[{0}, Table[d = Divisors[n]; Length[Select[d, Mod[#, 5] == 2 &]], {n, 100}]] (* T. D. Noe, Aug 10 2012 *) Table[Count[Divisors[n],?(Mod[#,5]==2&)],{n,0,90}] (* _Harvey P. Dale, May 20 2017 *)
-
PARI
a(n) = if (n==0, 0, sumdiv(n, d, (d % 5)==2)); \\ Michel Marcus, Feb 28 2021
Formula
G.f.: Sum_{n>=0} x^(5n+2)/(1-x^(5n+2)).
G.f.: Sum_{n>=1} x^(2*n)/(1-x^(5*n)). - Joerg Arndt, Jan 30 2011
Sum_{k=1..n} a(k) = n*log(n)/5 + c*n + O(n^(1/3)*log(n)), where c = gamma(2,5) - (1 - gamma)/5 = A256780 - (1 - A001620)/5 = 0.105832... (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023