login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A366970
a(n) = Sum_{k=3..n} binomial(k-1,2) * floor(n/k).
4
0, 0, 1, 4, 10, 21, 36, 60, 89, 131, 176, 245, 311, 404, 502, 631, 751, 926, 1079, 1295, 1501, 1756, 1987, 2330, 2612, 2978, 3332, 3779, 4157, 4707, 5142, 5736, 6278, 6926, 7508, 8336, 8966, 9785, 10555, 11533, 12313, 13427, 14288, 15449, 16521, 17742, 18777, 20306
OFFSET
1,4
FORMULA
G.f.: 1/(1-x) * Sum_{k>=1} x^(3*k)/(1-x^k)^3 = 1/(1-x) * Sum_{k>=3} binomial(k-1,2) * x^k/(1-x^k).
a(n) = (A064602(n)-3*A024916(n))/2 + A006218(n). - Chai Wah Wu, Oct 30 2023
PROG
(PARI) a(n) = sum(k=3, n, binomial(k-1, 2)*(n\k));
(Python)
from math import isqrt
def A366970(n): return (-(s:=isqrt(n))*(s*(s**2-(s<<1)-1)+8)+sum(((q:=n//w)+1)*(q*(q-4)+3*(w**2-3*w+4)) for w in range(1, s+1)))//6 # Chai Wah Wu, Oct 30 2023
CROSSREFS
Partial sums of A363610.
Sequence in context: A038411 A033599 A038412 * A047963 A301014 A301009
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Oct 30 2023
STATUS
approved