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.

A344597 a(n) = Sum_{k=1..n} mu(k) * (floor(n/k)^4 - floor((n-1)/k)^4).

Original entry on oeis.org

1, 14, 64, 160, 368, 592, 1104, 1520, 2400, 3056, 4640, 5264, 7824, 8736, 11776, 13216, 17984, 18384, 25344, 26080, 33312, 35120, 45584, 44320, 58480, 58512, 72000, 73200, 92624, 86848, 113520, 110144, 132640, 132416, 162816, 152112, 194544, 185616, 220416
Offset: 1

Views

Author

Seiichi Manyama, May 24 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[k] * First @ Differences @ (Quotient[{n - 1, n}, k]^4), {k, 1, n}]; Array[a, 50] (* Amiram Eldar, May 24 2021 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*((n\k)^4-((n-1)\k)^4));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, moebius(k)*x^k*(1+11*x^k+11*x^(2*k)+x^(3*k))/(1-x^k)^4))
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A082540(n):
        if n == 0:
            return 0
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A082540(k1)
            j, k1 = j2, n//j2
        return n*(n**3-1)-c+j
    def A344597(n): return A082540(n)-A082540(n-1) # Chai Wah Wu, May 09 2025

Formula

Sum_{k=1..n} a(k) * floor(n/k) = n^4.
Sum_{k=1..n} a(k) = A082540(n).
G.f.: Sum_{k >= 1} mu(k) * x^k * (1 + 11*x^k + 11*x^(2*k) + x^(3*k))/(1 - x^k)^4.