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.

A349912 Sum of A336466 and its Dirichlet inverse, where A336466 is fully multiplicative with a(p) = oddpart(p-1).

Original entry on oeis.org

2, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 1, 0, 6, 2, 1, 0, 1, 0, 1, 6, 10, 0, 1, 1, 6, 1, 3, 0, 0, 0, 1, 10, 2, 6, 1, 0, 18, 6, 1, 0, 0, 0, 5, 1, 22, 0, 1, 9, 1, 2, 3, 0, 1, 10, 3, 18, 14, 0, 1, 0, 30, 3, 1, 6, 0, 0, 1, 22, 0, 0, 1, 0, 18, 1, 9, 30, 0, 0, 1, 1, 10, 0, 3, 2, 42, 14, 5, 0, 1, 18, 11, 30, 46, 18, 1, 0, 9, 5, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 08 2021

Keywords

Crossrefs

Cf. A336466 (also a quadrisection of this sequence), A349911.
Cf. also A322581.

Programs

  • Mathematica
    f[p_, e_] := ((p-1)/2^IntegerExponent[p-1, 2])^e; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; sinv[1] = 1; sinv[n_] := sinv[n] = -DivisorSum[n, sinv[#] * s[n/#] &, # < n &]; a[n_] := s[n] + sinv[n]; Array[a, 100] (* Amiram Eldar, Dec 08 2021 *)
  • PARI
    A000265(n) = (n>>valuation(n,2));
    A336466(n) = { my(f=factor(n)); prod(k=1,#f~,A000265(f[k,1]-1)^f[k,2]); };
    memoA349911 = Map();
    A349911(n) = if(1==n,1,my(v); if(mapisdefined(memoA349911,n,&v), v, v = -sumdiv(n,d,if(dA336466(n/d)*A349911(d),0)); mapput(memoA349911,n,v); (v)));
    A349912(n) = (A336466(n)+A349911(n));

Formula

a(n) = A336466(n) + A349911(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A336466(d) * A349911(n/d).
a(4*n) = A336466(n).