cp's OEIS Frontend

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.

A188171 The number of divisors d of n of the form d == 5 (mod 8).

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Mar 23 2011

Keywords

Comments

a(5n) >= 1 as d=5 contributes to the count.

Examples

			a(13) = 1 because the divisor d=13 is 8+5 == 5 (mod 8).
		

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

A188169(n)+a(n) = A001826(n).
A188169(n)+A188170(n)-a(n)-A188172(n) = A002325(n).
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