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.

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

A307653 a(n) = Sum_{d|n} mu(d) * d^d.

Original entry on oeis.org

1, -3, -26, -3, -3124, 46626, -823542, -3, -26, 9999996872, -285311670610, 46626, -302875106592252, 11112006824734470, 437893890380856224, -3, -827240261886336764176, 46626, -1978419655660313589123978, 9999996872, 5842587018385982521380300852
Offset: 1

Views

Author

Seiichi Manyama, Apr 20 2019

Keywords

Examples

			a(6) = 1 - 2^2 - 3^3 + 6^6 = 46626.
		

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, MoebiusMu[#]*#^# &] &, 21] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    {a(n) = sumdiv(n, d, moebius(d)*d^d)}

Formula

a(prime(n)^m) = 1 - prime(n)^prime(n) = -A088730(n) for m > 0.
G.f.: Sum_{k>=1} mu(k)*k^k*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 20 2019

A307654 a(n) = Product_{p|n, p prime} (1 - p^p).

Original entry on oeis.org

1, -3, -26, -3, -3124, 78, -823542, -3, -26, 9372, -285311670610, 78, -302875106592252, 2470626, 81224, -3, -827240261886336764176, 78, -1978419655660313589123978, 9372, 21412092, 855935011830, -20880467999847912034355032910566, 78, -3124, 908625319776756, -26, 2470626
Offset: 1

Views

Author

Seiichi Manyama, Apr 20 2019

Keywords

Examples

			a(6) = (1 - 2^2) * (1 - 3^3) = 78.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := 1 - p^p; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 28] (* Amiram Eldar, May 13 2021 *)

A347251 a(n) = Sum_{d|n} mu(d)*mu(n/d)*d^n.

Original entry on oeis.org

1, -5, -28, 16, -3126, 47450, -823544, 0, 19683, 10009766650, -285311670612, -2176786432, -302875106592254, 11112685048647250, 437893920912786408, 0, -827240261886336764178, -101560344088905, -1978419655660313589123980, -100000000000001048576
Offset: 1

Views

Author

Seiichi Manyama, Aug 24 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, MoebiusMu[#] * MoebiusMu[n/#] * #^n &]; Array[a, 20] (* Amiram Eldar, Aug 24 2021 *)
  • PARI
    a(n) = sumdiv(n, d, moebius(d)*moebius(n/d)*d^n);

Formula

If p is prime, a(p) = -1 - p^p.

A321236 a(n) = Sum_{d|n} mu(d)^2*d^n.

Original entry on oeis.org

1, 5, 28, 17, 3126, 47450, 823544, 257, 19684, 10009766650, 285311670612, 2177317874, 302875106592254, 11112685048647250, 437893920912786408, 65537, 827240261886336764178, 101560344351050, 1978419655660313589123980, 100000095367432689202
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 06 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[MoebiusMu[d]^2 d^n, {d, Divisors[n]}], {n, 20}]
    nmax = 20; Rest[CoefficientList[Series[Sum[MoebiusMu[k]^2 (k x)^k/(1 - (k x)^k), {k, 1, nmax}], {x, 0, nmax}], x]]
    Table[Product[1 + Boole[PrimeQ[d]] d^n, {d, Divisors[n]}], {n, 20}]
  • PARI
    a(n) = sumdiv(n, d, moebius(d)^2*d^n) \\ Andrew Howroyd, Nov 06 2018

Formula

G.f.: Sum_{k>=1} mu(k)^2*(k*x)^k/(1 - (k*x)^k).
a(n) = Product_{p|n, p prime} (1 + p^n).

A322324 Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Product_{p|n, p prime} (1 - p^k).

Original entry on oeis.org

1, 1, 0, 1, -1, 0, 1, -3, -2, 0, 1, -7, -8, -1, 0, 1, -15, -26, -3, -4, 0, 1, -31, -80, -7, -24, 2, 0, 1, -63, -242, -15, -124, 24, -6, 0, 1, -127, -728, -31, -624, 182, -48, -1, 0, 1, -255, -2186, -63, -3124, 1200, -342, -3, -2, 0, 1, -511, -6560, -127, -15624, 7502, -2400, -7, -8, 4, 0
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 03 2018

Keywords

Examples

			Square array begins:
  1,  1,   1,    1,     1,     1, ...
  0, -1,  -3,   -7,   -15,   -31, ...
  0, -2,  -8,  -26,   -80,  -242, ...
  0, -1,  -3,   -7,   -15,   -31, ...
  0, -4, -24, -124,  -624, -3124, ...
  0,  2,  24,  182,  1200,  7502, ...
		

Crossrefs

Columns k=0..5 give A063524, A023900, A046970, A063453, A189922, A189923.
Cf. A008683, A059379, A059380, A321222 (diagonal).

Programs

  • Mathematica
    Table[Function[k, Product[1 - Boole[PrimeQ[d]] d^k, {d, Divisors[n]}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
    Table[Function[k, SeriesCoefficient[Sum[MoebiusMu[j] j^k x^j/(1 - x^j), {j, 1, n}], {x, 0, n}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
    Table[Function[k, Sum[MoebiusMu[d] d^k, {d, Divisors[n]}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
  • PARI
    T(n, k) = sumdiv(n, d, moebius(d)*d^k);
    matrix(6, 6, n, k, T(n, k-1)) \\ Michel Marcus, Dec 03 2018

Formula

G.f. of column k: Sum_{j>=1} mu(j)*j^k*x^j/(1 - x^j).
Dirichlet g.f. of column k: zeta(s)/zeta(s-k).
A(n,k) = Sum_{d|n} mu(d)*d^k.
Showing 1-6 of 6 results.