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.
%I A188169 #35 May 22 2025 18:37:16 %S A188169 1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1,2,1,2,1,1,1,1,1,2,2, %T A188169 1,2,1,1,1,1,2,1,1,1,2,1,1,1,2,2,2,1,1,2,1,1,2,1,1,1,1,1,2,1,2,2,1,2, %U A188169 1,1,1,2,2,1,2,1,1,1,1,1,3,2,1,1,2,1,1,1,2 %N A188169 The number of divisors d of n of the form d == 1 (mod 8). %C A188169 a(n) >= 1 as the divisor d=1 is always counted. %C A188169 The largest terms up to n = 10^6 are each equal to 24. Those 8 terms are for n = 675675, 765765, 799425, 855855, 863379, 883575, 945945, or 987525. - _Harvey P. Dale_, May 31 2017 %C A188169 From _David A. Corneth_, Apr 06 2021: (Start) %C A188169 a(n) can be computed from the prime factorization of n. Let v(n) = (n1, n3, n5, n7) where n_r is the number of divisors of n in class r (mod 8) (we do not care about even remainders). Then if gcd(k, m) = 1 we have v(k) = (k1, k3, k5, k7) so a(k) = k1, v(m) = (m1, m3, m5, m7) so a(m) = k1. %C A188169 We have a(k*m) = (km)_1 = k1*m1 + k2*m2 + k3*m3 + k4*m4. The other (km)_3..(km)_7 have a similar expression. %C A188169 If p == 1 (mod 8) then a(p^e) = e + 1 otherwise floor(e/2) + 1. (End) %H A188169 David A. Corneth, <a href="/A188169/b188169.txt">Table of n, a(n) for n = 1..10000</a> %H A188169 David A. Corneth, <a href="/A188169/a188169.gp.txt">PARI program</a>. %H A188169 R. A. Smith and M. V. Subbarao, <a href="https://doi.org/10.4153/CMB-1981-005-3">The average number of divisors in an arithmetic progression</a>, Canadian Mathematical Bulletin, Vol. 24, No. 1 (1981), pp. 37-41. %F A188169 a(n) + A188171(n) = A001826(n). %F A188169 G.f.: Sum_{k>=1} x^k/(1 - x^(8*k)). - _Ilya Gutkovskiy_, Sep 11 2019 %F A188169 a(k) = a(2*k). - _David A. Corneth_, Apr 06 2021 %F A188169 Sum_{k=1..n} a(k) = n*log(n)/8 + c*n + O(n^(1/3)*log(n)), where c = gamma(1,8) - (1 - gamma)/8 = A256781 - (1 - A001620)/8 = 0.735783... (Smith and Subbarao, 1981). - _Amiram Eldar_, Nov 25 2023 %p A188169 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: %p A188169 A188169 := proc(n) sigmamr(n,8,1) ; end proc: %t A188169 Table[Count[Divisors[n],_?(Mod[#,8]==1&)],{n,100}] (* _Harvey P. Dale_, May 31 2017 *) %o A188169 (PARI) a(n) = {my(d = divisors(n)); #select(x -> x%8 == 1, d)} \\ _David A. Corneth_, Apr 06 2021 %o A188169 (PARI) \\ See PARI link. _David A. Corneth_, Apr 06 2021 %Y A188169 Cf. A001826, A188170, A188171, A188172. %Y A188169 Cf. A001620, A256781. %K A188169 nonn,easy %O A188169 1,9 %A A188169 _R. J. Mathar_, Mar 23 2011