cp's OEIS Frontend

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.

A366938 a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(k+2,3) * floor(n/k).

This page as a plain text file.
%I A366938 #13 Oct 29 2023 22:06:28
%S A366938 1,-2,9,-14,22,-27,58,-85,91,-97,190,-243,213,-266,460,-499,471,-553,
%T A366938 778,-970,896,-845,1456,-1697,1264,-1560,2270,-2289,2207,-2307,3150,
%U A366938 -3793,3049,-3125,4765,-5079,4061,-4492,6634,-6714,5628,-6370,7821,-9120,7986,-7013
%N A366938 a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(k+2,3) * floor(n/k).
%F A366938 G.f.: 1/(1-x) * Sum_{k>=1} x^k/(1+x^k)^4 = -1/(1-x) * Sum_{k>=1} binomial(k+2,3) * (-x)^k/(1-x^k).
%o A366938 (PARI) a(n) = sum(k=1, n, (-1)^(k-1)*binomial(k+2, 3)*(n\k));
%o A366938 (Python)
%o A366938 from math import isqrt
%o A366938 def A366938(n): return (((s:=isqrt(m:=n>>1))*(s+1)**3*(s+2)<<4)-(t:=isqrt(n))*(t+1)**2*(t+2)*(t+3)-sum((((q:=m//w)+1)*(q*(q+1)*(q+2)+(w*(w+1)*((w<<1)+1)<<1))<<4) for w in range(1,s+1))+sum(((q:=n//w)+1)*(q*(q+2)*(q+3)+(w*(w+1)*(w+2)<<2)) for w in range(1,t+1)))//24 # _Chai Wah Wu_, Oct 29 2023
%Y A366938 Partial sums of A320901.
%Y A366938 Cf. A024919, A366937, A366939.
%Y A366938 Cf. A365409, A366659.
%K A366938 sign
%O A366938 1,2
%A A366938 _Seiichi Manyama_, Oct 29 2023