A188171 The number of divisors d of n of the form d == 5 (mod 8).
0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 2
Offset: 1
Examples
a(13) = 1 because the divisor d=13 is 8+5 == 5 (mod 8).
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
- Michael D. Hirschhorn, The number of representations of a number by various forms, Discrete Mathematics 298 (2005), 205-211.
- 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.
Crossrefs
Programs
-
Maple
sigmamr := proc(n,m,r) local a,d ; a := 0 ; for d in numtheory[divisors](n) do if modp(d,m) = r then a := a+1 ; end if; end do: a; end proc: A188171 := proc(n) sigmamr(n,8,5) ; end proc:
-
Mathematica
a[n_] := DivisorSum[n, 1 &, Mod[#, 8] == 5 &]; Array[a, 100] (* Amiram Eldar, Nov 25 2023 *)
-
PARI
A188171(n) = sumdiv(n, d, (5==(d%8))); \\ Antti Karttunen, Jul 09 2017
Formula
G.f.: Sum_{k>=1} x^(5*k)/(1 - x^(8*k)). - Ilya Gutkovskiy, Sep 11 2019
Sum_{k=1..n} a(k) = n*log(n)/8 + c*n + O(n^(1/3)*log(n)), where c = gamma(5,8) - (1 - gamma)/8 = -0.131189..., gamma(5,8) = -(psi(5/8) + log(8))/8 is a generalized Euler constant, and gamma is Euler's constant (A001620) (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023
Comments