login
A284100
a(n) = Sum_{d|n, d == 1 (mod 8)} d.
8
1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 18, 10, 1, 1, 1, 1, 1, 1, 26, 1, 10, 1, 1, 1, 1, 1, 34, 18, 1, 10, 1, 1, 1, 1, 42, 1, 1, 1, 10, 1, 1, 1, 50, 26, 18, 1, 1, 10, 1, 1, 58, 1, 1, 1, 1, 1, 10, 1, 66, 34, 1, 18, 1, 1, 1, 10, 74, 1, 26, 1, 1, 1, 1, 1
OFFSET
1,9
LINKS
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
Cf. A277090.
Cf. Sum_{d|n, d==1 (mod k)} d: A000593 (k=2), A078181 (k=3), A050449 (k=4), A284097 (k=5), A284098 (k=6), A284099 (k=7), this sequence (k=8).
Sequence in context: A118762 A360160 A360159 * A279051 A332804 A010178
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Mar 20 2017
STATUS
approved