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.

A356243 a(n) = Sum_{k=1..n} k^2 * sigma_{n-2}(k).

Original entry on oeis.org

1, 9, 49, 447, 4607, 71009, 1210855, 24980627, 575624572, 14958422046, 427890493960, 13431874937840, 457651929853662, 16844143705998554, 665499756005678382, 28102799297908820326, 1262909308355648335240, 60183118566605371095996
Offset: 1

Views

Author

Seiichi Manyama, Jul 30 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[k^2 * DivisorSigma[n - 2, k], {k, 1, n}]; Array[a, 18] (* Amiram Eldar, Jul 30 2022 *)
  • PARI
    a(n) = sum(k=1, n, k^2*sigma(k, n-2));
    
  • PARI
    a(n) = sum(k=1, n, k^n*sum(j=1, n\k, j^2));
    
  • Python
    from math import isqrt
    from sympy import bernoulli
    def A356243(n): return (((s:=isqrt(n))*(s+1)*(2*s+1))*((b:=bernoulli(n+1))-bernoulli(n+1, s+1)) + sum(k**n*(n+1)*((q:=n//k)*(q+1)*(2*q+1))+6*k**2*(bernoulli(n+1,q+1)-b) for k in range(1,s+1)))//(n+1)//6 # Chai Wah Wu, Oct 21 2023

Formula

a(n) = Sum_{k=1..n} k^n * Sum_{j=1..floor(n/k)} j^2 = Sum_{k=1..n} k^n * A000330(floor(n/k)).
a(n) = [x^n] (1/(1-x)) * Sum_{k>=1} k^n * x^k * (1 + x^k)/(1 - x^k)^3.