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 A366919 #13 Oct 29 2023 22:05:59 %S A366919 -1,2,-22,203,-2285,33855,-609345,12420372,-284964519,7347342215, %T A366919 -209807114169,6554034238459,-222469737401739,8159109186320903, %U A366919 -321461264348047819,13538455640979049698,-606976994365011212414,28864017965496692865925,-1451086990386146504580735 %N A366919 a(n) = Sum_{k=1..n} (-1)^k*k^n*floor(n/k). %F A366919 a(n) = (-1)^n*A308313(n). %F A366919 Let A(n,k) = Sum_{j=1..n} j^k * floor(n/j). Then a(n) = 2^(n+1)*A(floor(n/2),n)-A(n,n). %t A366919 a[n_]:=Sum[ (-1)^k*k^n*Floor[n/k],{k,n}]; Array[a,19] (* _Stefano Spezia_, Oct 29 2023 *) %o A366919 (Python) %o A366919 from math import isqrt %o A366919 from sympy import bernoulli %o A366919 def A366919(n): return ((((s:=isqrt(m:=n>>1))+1)*(bernoulli(n+1)-bernoulli(n+1,s+1))<<n+1)-((t:=isqrt(n))+1)*(bernoulli(n+1)-bernoulli(n+1,t+1))+(sum(w**n*(n+1)*((q:=m//w)+1)-bernoulli(n+1)+bernoulli(n+1,q+1) for w in range(1,s+1))<<n+1)-sum(w**n*(n+1)*((q:=n//w)+1)-bernoulli(n+1)+bernoulli(n+1,q+1) for w in range(1,t+1)))//(n+1) %o A366919 (PARI) a(n) = sum(k=1, n, (-1)^k*k^n*(n\k)); \\ _Michel Marcus_, Oct 29 2023 %Y A366919 Cf. A024919, A308313, A366915, A366917, A319649. %K A366919 sign %O A366919 1,2 %A A366919 _Chai Wah Wu_, Oct 28 2023