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.

A359432 Dirichlet inverse of A327936, which is multiplicative sequence with a(p^e) = p if e >= p, otherwise 1.

Original entry on oeis.org

1, -1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, 0, 1, -2, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 1, 0, 1, -1, -1, 0, 0, 1, 1, -1, 2, 1, -1, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 0, 1, 1, -1, -1, -1, 2, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 0, 0, -1, -1, -1, -1, -1, 1, -1, 2
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2023

Keywords

Comments

Multiplicative because A327936 is.

Crossrefs

Cf. A327936.
Cf. A038838 (positions of even terms), A122132 (of odd terms), A353627 (parity of terms).
Cf. also A358216, A359433.

Programs

  • Mathematica
    f[p_, e_] := Switch[Mod[e, p], 0, (1 - p)^(e/p), 1, -(1 - p)^((e - 1)/p), , 0]; a[1] = 1; a[n] := Times @@ f @@@ FactorInteger[n]; Table[a[n], {n, 1, 100}] (* Amiram Eldar, Jan 26 2023 *)
  • PARI
    A327936(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]>=f[k,1])); factorback(f); };
    memoA359432 = Map();
    A359432(n) = if(1==n,1,my(v); if(mapisdefined(memoA359432,n,&v), v, v = -sumdiv(n,d,if(dA327936(n/d)*A359432(d),0)); mapput(memoA359432,n,v); (v)));

Formula

Multiplicative with a(p^e) = (1 - p)^(e/p) if p | e, -(1 - p)^((e - 1)/p) if e == 1 (mod p), and 0 otherwise. - Amiram Eldar, Jan 26 2023