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.

A335062 a(n) = 1 - Sum_{d|n, d > 1} (-1)^d * a(n/d).

Original entry on oeis.org

1, 0, 2, 0, 2, -2, 2, 0, 4, -2, 2, 0, 2, -2, 6, 0, 2, -8, 2, 0, 6, -2, 2, 0, 4, -2, 8, 0, 2, -14, 2, 0, 6, -2, 6, 4, 2, -2, 6, 0, 2, -14, 2, 0, 16, -2, 2, 0, 4, -8, 6, 0, 2, -24, 6, 0, 6, -2, 2, 8, 2, -2, 16, 0, 6, -14, 2, 0, 6, -14, 2, 0, 2, -2, 16, 0, 6, -14, 2, 0, 16
Offset: 1

Views

Author

Ilya Gutkovskiy, May 21 2020

Keywords

Comments

Inverse Moebius transform of A308077.

Crossrefs

Cf. A048298, A065091 (positions of 2's), A067824, A067856, A308077, A325144, A335283.

Programs

  • Mathematica
    a[n_] := a[n] = 1 - DivisorSum[n, (-1)^# a[n/#] &, # > 1 &]; Table[a[n], {n, 1, 81}]
  • PARI
    lista(nn) = {my(va = vector(nn)); for (n=1, nn, va[n] = 1 - sumdiv(n, d, if (d>1, (-1)^d*va[n/d]));); va;} \\ Michel Marcus, May 22 2020

Formula

G.f. A(x) satisfies: A(x) = x / (1 - x) - Sum_{k>=2} (-1)^k * A(x^k).