OFFSET
1,9
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: Sum_{k>=0} (8*k + 1)*x^(8*k+1)/(1 - x^(8*k+1)). - Ilya Gutkovskiy, Mar 21 2017
G.f.: Sum_{n >= 1} x^n*(1 + 7*x^(8*n))/(1 - x^(8*n))^2. - Peter Bala, Dec 19 2021
Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = Pi^2/96 = 0.102808... . - Amiram Eldar, Nov 26 2023
MATHEMATICA
Table[Sum[If[Mod[d, 8] == 1, d, 0], {d, Divisors[n]}], {n, 80}] (* Indranil Ghosh, Mar 21 2017 *)
Table[Total[Select[Divisors[n], Mod[#, 8]==1&]], {n, 80}] (* or *) Table[DivisorSum[n, #&, Mod[#, 8]==1&], {n, 80}] (* Harvey P. Dale, Mar 28 2020 *)
PROG
(PARI) for(n=1, 80, print1(sumdiv(n, d, if(Mod(d, 8)==1, d, 0)), ", ")) \\ Indranil Ghosh, Mar 21 2017
(Python)
from sympy import divisors
def a(n): return sum([d for d in divisors(n) if d%8==1]) # Indranil Ghosh, Mar 21 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Mar 20 2017
STATUS
approved