A230476 a(n) = Sum_{i=1..n} d(8*i+1) - Sum_{i=1..n} d(2*i+1), where d(n) = A000005(n) is the number of divisors of n.
1, 1, 2, 3, 3, 4, 4, 6, 6, 7, 7, 6, 10, 10, 11, 11, 9, 11, 13, 15, 16, 14, 16, 15, 15, 17, 17, 22, 22, 22, 20, 18, 20, 24, 24, 25, 27, 27, 27, 26, 28, 26, 30, 30, 29, 31, 31, 37, 35, 35, 35, 31, 35, 35, 40, 40, 38, 40, 40, 41, 41, 41, 43, 47, 47, 46, 42, 44, 46, 50, 48, 46, 52, 52, 52, 54, 52, 55, 55, 53, 55, 53, 59, 58, 56, 58
Offset: 1
Keywords
Examples
The divisors of 8*1 + 1 = 9 are 1, 3, 9 and those of 2*1 + 1 = 3 are 1, 3, so a(1) = d(9) - d(3) = 3 - 2 = 1.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Jorge Luis Cimadevilla Villacorta, Certain inequalities associated with the divisor function, Amer. Math. Monthly, 120 (2013), 832-837. See inequalities (1.5).
Programs
-
Mathematica
Table[Sum[ DivisorSigma[0, 8 i + 1] - DivisorSigma[0, 2 i + 1], {i, n}], {n, 100}]
-
PARI
a(n) = sum(i=1, n, numdiv(8*i+1) - numdiv(2*i+1)); \\ Michel Marcus, Jun 19 2015
Formula
a(n) = log(2) * n + O(n^(1/3)*log(n)). - Amiram Eldar, Apr 12 2024
Comments