login
a(n) = Sum_{d|n, d == 2 (mod 5)} d.
12

%I #30 Nov 26 2023 03:05:57

%S 0,2,0,2,0,2,7,2,0,2,0,14,0,9,0,2,17,2,0,2,7,24,0,14,0,2,27,9,0,2,0,

%T 34,0,19,7,14,37,2,0,2,0,51,0,24,0,2,47,14,7,2,17,54,0,29,0,9,57,2,0,

%U 14,0,64,7,34,0,24,67,19,0,9,0,86,0,39,0,2,84,2,0,2

%N a(n) = Sum_{d|n, d == 2 (mod 5)} d.

%H Seiichi Manyama, <a href="/A284280/b284280.txt">Table of n, a(n) for n = 1..10000</a>

%F G.f.: Sum_{k>=0} (5*k + 2)*x^(5*k+2)/(1 - x^(5*k+2)). - _Ilya Gutkovskiy_, Mar 25 2017

%F Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = Pi^2/60 = 0.164493... (A013661 / 10). - _Amiram Eldar_, Nov 26 2023

%t Table[Sum[If[Mod[d, 5] == 2, d, 0], {d, Divisors[n]}], {n, 80}] (* _Indranil Ghosh_, Mar 24 2017 *)

%o (PARI) for(n=1, 80, print1(sumdiv(n, d, if(Mod(d, 5)==2, d, 0)), ", ")) \\ _Indranil Ghosh_, Mar 24 2017

%o (Python)

%o from sympy import divisors

%o def a(n): return sum([d for d in divisors(n) if d%5==2]) # _Indranil Ghosh_, Mar 24 2017

%Y Cf. A013661, A109698, A284152.

%Y Cf. Sum_{d|n, d=k mod 5} d: A284097 (k=1), this sequence (k=2), A284281 (k=3), A284103 (k=4).

%K nonn,easy

%O 1,2

%A _Seiichi Manyama_, Mar 24 2017