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.

A318995 Totally additive with a(prime(n)) = n - 1.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 3, 0, 2, 2, 4, 1, 5, 3, 3, 0, 6, 2, 7, 2, 4, 4, 8, 1, 4, 5, 3, 3, 9, 3, 10, 0, 5, 6, 5, 2, 11, 7, 6, 2, 12, 4, 13, 4, 4, 8, 14, 1, 6, 4, 7, 5, 15, 3, 6, 3, 8, 9, 16, 3, 17, 10, 5, 0, 7, 5, 18, 6, 9, 5, 19, 2, 20, 11, 5, 7, 7, 6, 21, 2, 4, 12
Offset: 1

Views

Author

Gus Wiseman, Sep 07 2018

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add((-1+numtheory[pi](i[1]))*i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 07 2018
  • Mathematica
    Table[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>(PrimePi[p]-1)*k]//Total,{n,200}]
  • PARI
    a(n)={my(f=factor(n)); sum(i=1, #f~, my([p, e]=f[i, ]); (primepi(p)-1)*e)} \\ Andrew Howroyd, Sep 07 2018