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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

1, -1, 6, -6, 10, -7, 22, -26, 26, -16, 51, -54, 38, -41, 101, -83, 71, -72, 119, -143, 123, -66, 211, -230, 111, -151, 279, -216, 220, -182, 315, -397, 237, -207, 467, -430, 274, -279, 599, -519, 343, -423, 524, -665, 557, -250, 879, -874, 380, -612, 874, -776
Offset: 1

Views

Author

Seiichi Manyama, Oct 29 2023

Keywords

Crossrefs

Partial sums of A320900.

Programs

  • PARI
    a(n) = sum(k=1, n, (-1)^(k-1)*binomial(k+1, 2)*(n\k));
    
  • Python
    from math import isqrt
    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

Formula

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).

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

Original entry on oeis.org

1, -2, 9, -14, 22, -27, 58, -85, 91, -97, 190, -243, 213, -266, 460, -499, 471, -553, 778, -970, 896, -845, 1456, -1697, 1264, -1560, 2270, -2289, 2207, -2307, 3150, -3793, 3049, -3125, 4765, -5079, 4061, -4492, 6634, -6714, 5628, -6370, 7821, -9120, 7986, -7013
Offset: 1

Views

Author

Seiichi Manyama, Oct 29 2023

Keywords

Crossrefs

Partial sums of A320901.

Programs

  • PARI
    a(n) = sum(k=1, n, (-1)^(k-1)*binomial(k+2, 3)*(n\k));
    
  • Python
    from math import isqrt
    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

Formula

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).
Showing 1-2 of 2 results.