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.

A366265 Dirichlet inverse of the sum of n/k over all prime powers k which divide n (including 1).

Original entry on oeis.org

1, -2, -2, 0, -2, 2, -2, 0, -1, 0, -2, 2, -2, -2, -1, 0, -2, 2, -2, 4, -3, -6, -2, 2, -3, -8, -2, 6, -2, 12, -2, 0, -7, -12, -5, 4, -2, -14, -9, 4, -2, 18, -2, 10, 2, -18, -2, 2, -5, -2, -13, 12, -2, 6, -9, 6, -15, -24, -2, 6, -2, -26, 2, 0, -11, 30, -2, 16, -19, 16, -2, 0, -2, -32, -4, 18, -11, 36, -2, 4, -4, -36
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2023

Keywords

Comments

Dirichlet inverse of sequence b(n) = 1+A095112(n).

Crossrefs

Cf. A095112, A359595 (parity of terms), A359596 (positions of odd terms).
Agrees paritywise with A358777 and A359589.

Programs

  • Mathematica
    A095112[n_] := n/Flatten[#[[1]]^Range[#[[2]]]& /@ FactorInteger[n]] // Total;
    a[n_] := a[n] = If[n == 1, 1, -Sum[(1 + A095112[n/d]) a[d], {d, Most@ Divisors[n]}]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 26 2023 *)
  • PARI
    A095112(n) = sumdiv(n,d,(1==omega(d))*(n/d));
    memoA366265 = Map();
    A366265(n) = if(1==n,1,my(v); if(mapisdefined(memoA366265,n,&v), v, v = -sumdiv(n,d,if(dA095112(n/d))*A366265(d),0)); mapput(memoA366265,n,v); (v)));

Formula

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