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.

A358276 a(1) = 1; a(n) = n * Sum_{d|n, d < n} (-1)^(n/d - 1) * a(d) / d.

Original entry on oeis.org

1, -2, 3, 0, 5, -18, 7, 0, 18, -30, 11, 24, 13, -42, 45, 0, 17, -144, 19, 40, 63, -66, 23, 0, 50, -78, 108, 56, 29, -390, 31, 0, 99, -102, 105, 360, 37, -114, 117, 0, 41, -546, 43, 88, 360, -138, 47, 0, 98, -400, 153, 104, 53, -1080, 165, 0, 171, -174, 59, 1080, 61, -186, 504, 0, 195, -858, 67, 136
Offset: 1

Views

Author

Seiichi Manyama, Mar 30 2023

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, add(b(n/d)*
         (-1)^(d-1), d=numtheory[divisors](n) minus {1}))
        end:
    a:= n-> n*b(n):
    seq(a(n), n=1..68);  # Alois P. Heinz, Mar 30 2023
  • Mathematica
    a[1] = 1; a[n_] := a[n] = n * DivisorSum[n, (-1)^(n/# - 1) * a[#]/# &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 31 2023 *)
  • PARI
    a(n) = if (n==1, 1, n*sumdiv(n, d, if (dMichel Marcus, Mar 30 2023

Formula

a(n) = n * A308077(n).
If p is prime, a(p) = (-1)^(p-1) * p.
G.f. A(x) satisfies A(x) = x - Sum_{k>=2} (-1)^k * k * A(x^k).