Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A364970
a(n) = Sum_{k=1..n} binomial(floor(n/k)+2,3).
6
1, 5, 12, 26, 42, 73, 102, 152, 204, 278, 345, 464, 556, 693, 835, 1021, 1175, 1422, 1613, 1907, 2173, 2496, 2773, 3228, 3569, 4015, 4445, 4998, 5434, 6120, 6617, 7331, 7965, 8717, 9391, 10392, 11096, 12031, 12909, 14059, 14921, 16219, 17166, 18489, 19711, 21072, 22201
OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} binomial(k+1,2) * floor(n/k).
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).
a(n) = (A064602(n)+A024916(n))/2. - Chai Wah Wu, Oct 26 2023
MATHEMATICA
Table[Sum[Binomial[Floor[n/k+2], 3], {k, n}], {n, 50}] (* Harvey P. Dale, Aug 04 2024 *)
PROG
(PARI) a(n) = sum(k=1, n, binomial(n\k+2, 3));
(Python)
from math import isqrt
def A364970(n): return (-(s:=isqrt(n))**2*(s+1)*(s+2)+sum((q:=n//k)*(3*k*(k+1)+(q+1)*(q+2)) for k in range(1, s+1)))//6 # Chai Wah Wu, Oct 26 2023
CROSSREFS
Partial sums of A007437.
Sequence in context: A223321 A073095 A309323 * A294017 A367379 A212561
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Oct 23 2023
STATUS
approved