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 A359812 #20 Aug 09 2023 00:53:53 %S A359812 1,0,2,-2,2,-1,2,-12,11,-11,2,-27,2,-57,108,-200,2,-40,2,-653,780, %T A359812 -1013,2,-1177,627,-4083,6644,-11959,2,5043,2,-49680,59172,-65519, %U A359812 18028,-26670,2,-262125,531612,-713423,2,515723,2,-3144419,5180382,-4194281,2 %N A359812 a(n) = Sum_{d|n} (-1)^(d-1) * d^(n/d-1). %H A359812 Seiichi Manyama, <a href="/A359812/b359812.txt">Table of n, a(n) for n = 1..5000</a> %F A359812 G.f.: -Sum_{k>0} (-x)^k / (1 - k * x^k). %F A359812 If p is an odd prime, a(p) = 2. %t A359812 a[n_] := DivisorSum[n, (-1)^(#-1) * #^(n/# - 1) &]; Array[a, 50] (* _Amiram Eldar_, Aug 09 2023 *) %o A359812 (PARI) a(n) = sumdiv(n, d, (-1)^(d-1)*d^(n/d-1)); %o A359812 (PARI) my(N=50, x='x+O('x^N)); Vec(-sum(k=1, N, (-x)^k/(1-k*x^k))) %Y A359812 Cf. A087909, A359811. %K A359812 sign,easy %O A359812 1,3 %A A359812 _Seiichi Manyama_, Jan 14 2023