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-6 of 6 results.

A068340 a(n) = Sum_{k=1..n} mu(k)*k, where mu(k) is the Moebius function.

Original entry on oeis.org

1, -1, -4, -4, -9, -3, -10, -10, -10, 0, -11, -11, -24, -10, 5, 5, -12, -12, -31, -31, -10, 12, -11, -11, -11, 15, 15, 15, -14, -44, -75, -75, -42, -8, 27, 27, -10, 28, 67, 67, 26, -16, -59, -59, -59, -13, -60, -60, -60, -60, -9, -9, -62, -62, -7, -7, 50, 108, 49
Offset: 1

Views

Author

Leroy Quet, Feb 27 2002

Keywords

Comments

Row sums of triangle A143158. - Gary W. Adamson, Jul 27 2008

Crossrefs

Programs

  • Haskell
    a068340 n = a068340_list !! (n-1)
    a068340_list = scanl1 (+) a055615_list
    -- Reinhard Zumkeller, Sep 04 2015
    
  • Maple
    with(numtheory):
    a:= proc(n) a(n):= mobius(n)*n +a(n-1) end: a(0):=0:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 21 2012
  • Mathematica
    Table[Sum[MoebiusMu[k]k,{k,n}],{n,60}] (* Harvey P. Dale, Feb 01 2012 *)
  • PARI
    a(n) = sum(k=1, n, k*moebius(k)); \\ Michel Marcus, Jan 14 2023
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A068340(n):
        if n <= 1:
            return 1
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= (j2*(j2-1)-j*(j-1)>>1)*A068340(k1)
            j, k1 = j2, n//j2
        return c-(n*(n+1)-(j-1)*j>>1) # Chai Wah Wu, Apr 04 2023

Formula

G.f. A(x) satisfies x = Sum_{k>=1} k * (1 - x^k) * A(x^k). - Seiichi Manyama, Apr 01 2023
Sum_{k=1..n} k * a(floor(n/k)) = 1. - Seiichi Manyama, Apr 03 2023

A336276 a(n) = Sum_{k=1..n} mu(k)*k^2.

Original entry on oeis.org

1, -3, -12, -12, -37, -1, -50, -50, -50, 50, -71, -71, -240, -44, 181, 181, -108, -108, -469, -469, -28, 456, -73, -73, -73, 603, 603, 603, -238, -1138, -2099, -2099, -1010, 146, 1371, 1371, 2, 1446, 2967, 2967, 1286, -478, -2327, -2327, -2327, -211, -2420
Offset: 1

Views

Author

Donald S. McDonald, Jul 15 2020

Keywords

Comments

Conjecture: a(n) changes sign infinitely often.

Crossrefs

Programs

  • Mathematica
    Array[Sum[MoebiusMu[k]*k^2, {k, #}] &, 47] (* Michael De Vlieger, Jul 15 2020 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*k^2); \\ Michel Marcus, Jul 15 2020
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A336276(n):
        if n <= 1:
            return 1
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= (j2*(j2-1)*((j2<<1)-1)-j*(j-1)*((j<<1)-1))//6*A336276(k1)
            j, k1 = j2, n//j2
        return c-(n*(n+1)*((n<<1)+1)-j*(j-1)*((j<<1)-1))//6 # Chai Wah Wu, Apr 04 2023

Formula

Partial sums of A334657.
G.f. A(x) satisfies x = Sum_{k>=1} k^2 * (1 - x^k) * A(x^k). - Seiichi Manyama, Apr 01 2023
Sum_{k=1..n} k^2 * a(floor(n/k)) = 1. - Seiichi Manyama, Apr 03 2023

A336277 a(n) = Sum_{k=1..n} mu(k)*k^3.

Original entry on oeis.org

1, -7, -34, -34, -159, 57, -286, -286, -286, 714, -617, -617, -2814, -70, 3305, 3305, -1608, -1608, -8467, -8467, 794, 11442, -725, -725, -725, 16851, 16851, 16851, -7538, -34538, -64329, -64329, -28392, 10912, 53787, 53787, 3134, 58006, 117325, 117325, 48404
Offset: 1

Views

Author

Donald S. McDonald, Jul 15 2020

Keywords

Comments

Conjecture: a(n) changes sign infinitely often.

Crossrefs

Programs

  • Mathematica
    Array[Sum[MoebiusMu[k]*k^3, {k, #}] &, 41] (* Michael De Vlieger, Jul 15 2020 *)
    Accumulate[Table[MoebiusMu[n] n^3,{n,50}]] (* Harvey P. Dale, Aug 15 2024 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*k^3); \\ Michel Marcus, Jul 15 2020
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A336277(n):
        if n <= 1:
            return 1
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= ((j2*(j2-1))**2-(j*(j-1))**2>>2)*A336277(k1)
            j, k1 = j2, n//j2
        return c-((n*(n+1))**2-((j-1)*j)**2>>2) # Chai Wah Wu, Apr 04 2023

Formula

Partial sums of A334659.
G.f. A(x) satisfies x = Sum_{k>=1} k^3 * (1 - x^k) * A(x^k). - Seiichi Manyama, Apr 01 2023
Sum_{k=1..n} k^3 * a(floor(n/k)) = 1. - Seiichi Manyama, Apr 03 2023

A336279 a(n) = Sum_{k=1..n} mu(k)*k^5.

Original entry on oeis.org

1, -31, -274, -274, -3399, 4377, -12430, -12430, -12430, 87570, -73481, -73481, -444774, 93050, 852425, 852425, -567432, -567432, -3043531, -3043531, 1040570, 6194202, -242141, -242141, -242141, 11639235, 11639235, 11639235, -8871914, -33171914, -61801065
Offset: 1

Views

Author

Donald S. McDonald, Jul 15 2020

Keywords

Comments

Conjecture: a(n) changes sign infinitely often.

Crossrefs

Programs

  • Mathematica
    Array[Sum[MoebiusMu[k]*k^5, {k, #}] &, 32] (* Michael De Vlieger, Jul 15 2020 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*k^5); \\ Michel Marcus, Jul 15 2020
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A336279(n):
        if n <= 1:
            return 1
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= (j2**2*(j2**2*(j2*(2*j2 - 6) + 5) - 1)-j**2*(j**2*(j*(2*j - 6) + 5) - 1))//12*A336279(k1)
            j, k1 = j2, n//j2
        return c-(n**2*(n**2*(n*(2*n + 6) + 5) - 1)-j**2*(j**2*(j*(2*j - 6) + 5) - 1))//12 # Chai Wah Wu, Apr 04 2023

Formula

From Seiichi Manyama, Apr 03 2023: (Start)
G.f. A(x) satisfies x = Sum_{k>=1} k^5 * (1 - x^k) * A(x^k).
Sum_{k=1..n} k^5 * a(floor(n/k)) = 1. (End)

A344429 a(n) = Sum_{k=1..n} mu(k) * k^n.

Original entry on oeis.org

1, -3, -34, -96, -3399, 30239, -624046, -4482626, -32249230, 9768165230, -186975207617, -2150337557747, -327482869358214, 6894274639051756, 539094536846680025, 8044964790023844733, -707278869236116107432, -12275330572755863672628, -2190860499375418948848067
Offset: 1

Views

Author

Seiichi Manyama, May 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[k] * k^n, {k,1,n}]; Array[a, 20] (* Amiram Eldar, May 19 2021 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*k^n);
    
  • Python
    from functools import lru_cache
    from math import comb
    from sympy import bernoulli
    @lru_cache(maxsize=None)
    def faulhaber(n,p):
        """ Faulhaber's formula for calculating Sum_{k=1..n} k^p
            requires sympy version 1.12+ where bernoulli(1) = 1/2
        """
        return sum(comb(p+1,k)*bernoulli(k)*n**(p-k+1) for k in range(p+1))//(p+1)
    @lru_cache(maxsize=None)
    def A344429(n,m=None):
        if n <= 1:
            return 1
        if m is None:
            m=n
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (faulhaber(j-1,m)-faulhaber(j2-1,m))*A344429(k1,m)
            j, k1 = j2, n//j2
        return c+faulhaber(j-1,m)-faulhaber(n,m) # Chai Wah Wu, Nov 02 2023

A344430 a(n) = Sum_{k=1..n} mu(k) * k^k.

Original entry on oeis.org

1, -3, -30, -30, -3155, 43501, -780042, -780042, -780042, 9999219958, -275312450653, -275312450653, -303150419042906, 10808856406515110, 448702746787374485, 448702746787374485, -826791559139549389692, -826791559139549389692
Offset: 1

Views

Author

Seiichi Manyama, May 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[k] * k^k, {k,1,n}]; Array[a, 20] (* Amiram Eldar, May 19 2021 *)
    Accumulate[Table[MoebiusMu[n]n^n,{n,20}]] (* Harvey P. Dale, Jan 25 2022 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*k^k);
    
  • Python
    from sympy import mobius
    def A344430(n): return sum(mobius(k)*k**k for k in range(1,n+1)) # Chai Wah Wu, Apr 05 2023
Showing 1-6 of 6 results.