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.

A343761 a(1) = 1; a(n) = -Sum_{k=1..n, gcd(n,k) > 1} a(n/gcd(n,k)).

Original entry on oeis.org

1, -1, -1, 0, -1, 2, -1, 0, 1, 4, -1, -2, -1, 6, 5, 0, -1, -8, -1, -12, 7, 10, -1, 6, 3, 12, -5, -30, -1, -54, -1, 0, 11, 16, 9, 48, -1, 18, 13, 84, -1, -116, -1, -90, -41, 22, -1, -42, 5, -72, 17, -132, -1, 130, 13, 330, 19, 28, -1, 482, -1, 30, -83, 0, 15, -312, -1, -240, 23, -258
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 28 2021

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local G,g;
      G:= subs(1=NULL, map(igcd,[$1..n],n));
      -add(procname(n/g), g=G);
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Dec 21 2022
  • Mathematica
    a[1] = 1; a[n_] := a[n] = -Sum[If[GCD[n, k] > 1, a[n/GCD[n, k]], 0], {k, 1, n}]; Table[a[n], {n, 1, 70}]
    a[1] = 1; a[n_] := -Sum[If[d < n, EulerPhi[d] a[d], 0], {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]

Formula

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