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-4 of 4 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

A360390 a(1) = 1; a(n) = -Sum_{k=2..n} k^2 * a(floor(n/k)).

Original entry on oeis.org

1, -4, -13, -9, -34, 11, -38, -38, -38, 87, -34, -70, -239, 6, 231, 231, -58, -58, -419, -519, -78, 527, -2, -2, -2, 843, 843, 647, -194, -1319, -2280, -2280, -1191, 254, 1479, 1479, 110, 1915, 3436, 3436, 1755, -450, -2299, -2783, -2783, -138, -2347, -2347, -2347, -2347, 254, -422
Offset: 1

Views

Author

Seiichi Manyama, Apr 01 2023

Keywords

Crossrefs

Partial sums of A359485.
Cf. A336276.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -p^2, 0]; f[2, e_] := Switch[e, 1, -5, 2, 4, , 0]; s[1] = 1; s[n] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 10 2023 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A360390(n):
        if n <= 1:
            return 1
        c, j = 0, 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*A360390(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 01 2023

Formula

Sum_{k=1..n} k^2 * a(floor(n/k)) = 0 for n > 1.
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k^2 * (1 - x^k) * A(x^k).

A359484 a(n) = n * mu(n) if n is odd, otherwise n * mu(n) - (n/2) * mu(n/2).

Original entry on oeis.org

1, -3, -3, 2, -5, 9, -7, 0, 0, 15, -11, -6, -13, 21, 15, 0, -17, 0, -19, -10, 21, 33, -23, 0, 0, 39, 0, -14, -29, -45, -31, 0, 33, 51, 35, 0, -37, 57, 39, 0, -41, -63, -43, -22, 0, 69, -47, 0, 0, 0, 51, -26, -53, 0, 55, 0, 57, 87, -59, 30, -61, 93, 0, 0, 65, -99, -67, -34, 69, -105, -71, 0
Offset: 1

Views

Author

Seiichi Manyama, Mar 31 2023

Keywords

Crossrefs

Partial sums give A359478.

Programs

  • Mathematica
    a[n_] := n * MoebiusMu[n] - If[OddQ[n], 0, MoebiusMu[n/2]*n/2]; Array[a, 100] (* Amiram Eldar, May 09 2023 *)
  • PARI
    a(n) = n*moebius(n)-if(n%2, 0, n/2*moebius(n/2));

Formula

a(n) = A055615(n) if n is odd, otherwise A055615(n) - A055615(n/2).
a(n) is multiplicative with a(2)= -3, a(4)= 2, a(2^e)= 0 if e>2. a(p)= -p, a(p^e)= 0 if e>1, p>2.
a(1) = 1, a(2) = -3; a(n) = -n * Sum_{d|n, d < n} a(d) / d.
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k * A(x^k).
a(n) = n*mu(n)-n*mu(n*2^(n mod 2)/2)*((n+1) mod 2)/2. - Wesley Ivan Hurt, Jun 09 2023

A360658 a(1) = 1; a(n) = -Sum_{k=2..n} k^3 * a(floor(n/k)).

Original entry on oeis.org

1, -8, -35, -27, -152, 91, -252, -252, -252, 873, -458, -674, -2871, 216, 3591, 3591, -1322, -1322, -8181, -9181, 80, 12059, -108, -108, -108, 19665, 19665, 16921, -7468, -37843, -67634, -67634, -31697, 12520, 55395, 55395, 4742, 66473, 125792, 125792, 56871, -26478
Offset: 1

Views

Author

Seiichi Manyama, Apr 01 2023

Keywords

Crossrefs

Partial sums of A359531.
Cf. A336277.

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, -p^3, 0]; f[2, e_] := Switch[e, 1, -9, 2, 8, , 0]; s[1] = 1; s[n] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 10 2023 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A360658(n):
        if n <= 1:
            return 1
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c -= ((j2*(j2-1))**2-(j*(j-1))**2>>2)*A360658(k1)
            j, k1 = j2, n//j2
        return c-((n*(n+1))**2-((j-1)*j)**2>>2) # Chai Wah Wu, Apr 01 2023

Formula

Sum_{k=1..n} k^3 * a(floor(n/k)) = 0 for n > 1.
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} k^3 * (1 - x^k) * A(x^k).
Showing 1-4 of 4 results.