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.

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

This page as a plain text file.
%I A366937 #14 Oct 29 2023 22:06:21
%S A366937 1,-1,6,-6,10,-7,22,-26,26,-16,51,-54,38,-41,101,-83,71,-72,119,-143,
%T A366937 123,-66,211,-230,111,-151,279,-216,220,-182,315,-397,237,-207,467,
%U A366937 -430,274,-279,599,-519,343,-423,524,-665,557,-250,879,-874,380,-612,874,-776
%N A366937 a(n) = Sum_{k=1..n} (-1)^(k-1) * binomial(k+1,2) * floor(n/k).
%F A366937 G.f.: 1/(1-x) * Sum_{k>=1} x^k/(1+x^k)^3 = -1/(1-x) * Sum_{k>=1} binomial(k+1,2) * (-x)^k/(1-x^k).
%o A366937 (PARI) a(n) = sum(k=1, n, (-1)^(k-1)*binomial(k+1, 2)*(n\k));
%o A366937 (Python)
%o A366937 from math import isqrt
%o A366937 def A366937(n): return (((s:=isqrt(m:=n>>1))*(s+1)**2*((s<<2)+5)<<1)-(t:=isqrt(n))*(t+1)**2*(t+2)-sum((((q:=m//w)+1)*(q*((q<<2)+5)+6*w*((w<<1)+1))<<1) for w in range(1,s+1))+sum(((q:=n//w)+1)*(q*(q+2)+3*w*(w+1)) for w in range(1,t+1)))//6 # _Chai Wah Wu_, Oct 29 2023
%Y A366937 Partial sums of A320900.
%Y A366937 Cf. A024919, A366938, A366939.
%Y A366937 Cf. A364970, A366395.
%K A366937 sign
%O A366937 1,3
%A A366937 _Seiichi Manyama_, Oct 29 2023