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.

A305805 Dirichlet inverse of A175851.

Original entry on oeis.org

1, -1, -1, -1, -1, 0, -1, 1, -2, -2, -1, 3, -1, 0, -1, -1, -1, 5, -1, 7, -1, -2, -1, 0, -2, -2, 0, -1, -1, 10, -1, 3, -1, -2, -3, -3, -1, 0, -1, 0, -1, 6, -1, 7, 6, -2, -1, -1, -2, 7, -3, 3, -1, 4, -1, 6, -3, -4, -1, -7, -1, 0, 6, -1, -3, 6, -1, 7, -1, 12, -1, -4, -1, 0, 6, 1, -3, 6, -1, -5, 8, -2, -1, 5, -1, -2, -3, -2, -1, 0, -1, 5
Offset: 1

Views

Author

Antti Karttunen, Jun 13 2018

Keywords

Crossrefs

Programs

  • Mathematica
    b[n_] := If[n < 3, 1, n - NextPrime[n + 1, -1] + 1];
    a[n_] := a[n] = If[n == 1, 1, -Sum[b[n/d] a[d], {d, Most@Divisors[n]}]];
    Array[a, 100] (* Jean-François Alcover, Feb 17 2020 *)
  • PARI
    A175851(n) = if(1==n,n,1 + n - precprime(n));
    A305805(n) = if(1==n,1,-sumdiv(n,d,if(dA175851(n/d)*A305805(d),0)));

Formula

a(1) = 1; for n > 1, a(n) = -Sum_{d|n, dA175851(n/d)*a(d).