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.

Showing 1-1 of 1 results.

A345374 Number of unitary prime divisors of n whose prime index is odd.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jun 16 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1 && OddQ[PrimePi[p]], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 06 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i,2] == 1 && primepi(f[i,1])%2, 1, 0));} \\ Amiram Eldar, Oct 06 2023

Formula

a(n) = Sum_{p|n, p prime} (pi(p) mod 2) * floor(1/gcd(p,n/p)).
From Amiram Eldar, Oct 06 2023: (Start)
a(n) = A056169(n) - A345375(n).
a(n) <= A324966(n), with equality if and only if n is squarefree (A005117).
Additive with a(p^e) = 1 if e = 1 and primepi(p) is odd and 0 otherwise. (End)
Showing 1-1 of 1 results.