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.

A342828 a(n) = Sum_{d|n} (-1)^(n/d+1) * d^(n-d).

Original entry on oeis.org

1, 0, 2, -4, 2, -11, 2, -320, 731, -2869, 2, -1827, 2, -819447, 10297068, -33570816, 2, 1775078476, 2, -36222872973, 678610493340, -285310622035, 2, 169888943418701, 95367431640627, -302875089815037, 150094917726535604, -569376395999240231, 2, 104002456598734754865, 2
Offset: 1

Views

Author

Seiichi Manyama, Mar 23 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, (-1)^(n/# + 1) * #^(n - #) &]; Array[a, 30] (* Amiram Eldar, Mar 23 2021 *)
  • PARI
    a(n) = sumdiv(n, d, (-1)^(n/d+1)*d^(n-d));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1+(k*x)^k)))

Formula

G.f.: Sum_{k>=1} x^k/(1 + (k * x)^k).
If p is an odd prime, a(p) = 2.