A188172 Number of divisors d of n of the form d == 7 (mod 8).
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1
Offset: 1
Examples
a(A007522(i)) = 1, any i.
Links
- Reinhard Zumkeller, 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
-
Haskell
a188172 n = length $ filter ((== 0) . mod n) [7,15..n] -- Reinhard Zumkeller, Mar 26 2011
-
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: A188172 := proc(n) sigmamr(n,8,7) ; end proc:
-
Mathematica
Table[Count[Divisors[n],?(Mod[#,8]==7&)],{n,90}] (* _Harvey P. Dale, Mar 08 2014 *)
-
PARI
a(n) = sumdiv(n, d, (d % 8) == 7); \\ Amiram Eldar, Nov 25 2023
Formula
a(A188226(n))=n and a(m)<>n for m<A188226(n), n>=0; a(A141164(n))=1. - Reinhard Zumkeller, Mar 26 2011
G.f.: Sum_{k>=1} x^(7*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(7,8) - (1 - gamma)/8 = -0.212276..., gamma(7,8) = -(psi(7/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