%I #38 Nov 26 2023 03:06:42
%S 1,1,1,1,6,1,1,1,10,6,1,1,14,1,6,1,18,10,1,6,22,1,1,1,31,14,10,1,30,6,
%T 1,1,34,18,6,10,38,1,14,6,42,22,1,1,60,1,1,1,50,31,18,14,54,10,6,1,58,
%U 30,1,6,62,1,31,1,84,34,1,18,70,6,1,10,74,38,31,1
%N a(n) = Sum_{d|n, d == 1 (mod 4)} d.
%C Not multiplicative: a(3)*a(7) != a(21), for example. - _R. J. Mathar_, Dec 20 2011
%H Seiichi Manyama, <a href="/A050449/b050449.txt">Table of n, a(n) for n = 1..10000</a>
%H Mariusz Skałba, <a href="http://math.colgate.edu/~integers/u92/u92.pdf">A Note on Sums of Two Squares and Sum-of-divisors Functions</a>, INTEGERS 20A (2020) A92.
%F G.f.: Sum_{n>=0} (4*n+1)*x^(4*n+1)/(1-x^(4*n+1)). - _Vladeta Jovovic_, Nov 14 2002
%F a(n) = A000593(n) - A050452(n). - _Reinhard Zumkeller_, Apr 18 2006
%F G.f.: Sum_{n >= 1} x^n*(1 + 3*x^(4*n))/(1 - x^(4*n))^2. - _Peter Bala_, Dec 19 2021
%F Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = Pi^2/48 = 0.205616... (A245058). - _Amiram Eldar_, Nov 26 2023
%p A050449 := proc(n)
%p a := 0 ;
%p for d in numtheory[divisors](n) do
%p if d mod 4 = 1 then
%p a := a+d ;
%p end if;
%p end do:
%p a;
%p end proc:
%p seq(A050449(n),n=1..40) ; # _R. J. Mathar_, Dec 20 2011
%t a[n_] := DivisorSum[n, Boole[Mod[#, 4] == 1]*#&]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 30 2018 *)
%o (PARI) a(n) = sumdiv(n, d, d*((d % 4) == 1)); \\ _Michel Marcus_, Jan 30 2018
%Y Cf. A000593, A050452, A050460, A001826, A035451, A245058.
%Y Cf. Sum_{d|n, d==1 (mod k)} d: A000593 (k=2), A078181 (k=3), this sequence (k=4), A284097 (k=5), A284098 (k=6), A284099 (k=7), A284100 (k=8).
%K nonn,easy
%O 1,5
%A _N. J. A. Sloane_, Dec 23 1999
%E More terms from _Vladeta Jovovic_, Nov 14 2002
%E More terms from _Reinhard Zumkeller_, Apr 18 2006