This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A050458 #24 Aug 28 2023 08:25:18 %S A050458 1,1,8,1,26,8,48,1,73,26,120,8,170,48,208,1,290,73,360,26,384,120,528, %T A050458 8,651,170,656,48,842,208,960,1,960,290,1248,73,1370,360,1360,26,1682, %U A050458 384,1848,120,1898,528,2208,8,2353,651,2320,170,2810,656,3120,48,2880,842 %N A050458 Difference between Sum_{d|n, d == 1 (mod 4)} d^2 and Sum_{d|n, d == 3 (mod 4)} d^2. %H A050458 Amiram Eldar, <a href="/A050458/b050458.txt">Table of n, a(n) for n = 1..10000</a> %F A050458 Multiplicative with a(p^e) = 1 if p = 2; ((p^2)^(e+1)-1)/(p^2-1) if p == 1 (mod 4); ((p^2)^(e+1)+(-1)^e)/(p^2+1) if p == 3 (mod 4). - _Michael Somos_, Aug 09 2006 %t A050458 f[p_, e_] := If[Mod[p, 4] == 1, ((p^2)^(e+1)-1)/(p^2-1), ((p^2)^(e+1)+(-1)^e)/(p^2+1)]; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* _Amiram Eldar_, Aug 28 2023 *) %o A050458 (PARI) {a(n)=if(n<1, 0, abs(sumdiv(n, d, d^2*kronecker(-4,d))))} /* _Michael Somos_, Aug 09 2006 */ %o A050458 (PARI) {a(n)= local(A, p, e); if(n<1, 0, A=factor(n); prod(k=1, matsize(A)[1], if(p=A[k, 1], e=A[k, 2]; if(p==2, 1, if(p%4==1, ((p^2)^(e+1)-1)/(p^2-1), ((p^2)^(e+1)+(-1)^e)/(p^2+1)))))) } /* _Michael Somos_, Aug 09 2006 */ %o A050458 (PARI) {a(n)=if(n<1, 0, polcoeff( sum(k=1,n, x^k/(1+x^(2*k))*(k/2^valuation(k,2))^2, x*O(x^n)), n))} /* _Michael Somos_, Aug 09 2006 */ %Y A050458 a(n) = |A002173(n)|. %K A050458 nonn,easy,mult %O A050458 1,3 %A A050458 _Vladeta Jovovic_, Feb 15 2004 %E A050458 Edited by _Michael Somos_, Aug 09 2006