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.

A373592 Number of primes congruent to 2 modulo 3 dividing n (with multiplicity).

Original entry on oeis.org

0, 1, 0, 2, 1, 1, 0, 3, 0, 2, 1, 2, 0, 1, 1, 4, 1, 1, 0, 3, 0, 2, 1, 3, 2, 1, 0, 2, 1, 2, 0, 5, 1, 2, 1, 2, 0, 1, 0, 4, 1, 1, 0, 3, 1, 2, 1, 4, 0, 3, 1, 2, 1, 1, 2, 3, 0, 2, 1, 3, 0, 1, 0, 6, 1, 2, 0, 3, 1, 2, 1, 3, 0, 1, 2, 2, 1, 1, 0, 5, 0, 2, 1, 2, 2, 1, 1, 4, 1, 2, 0, 3, 0, 2, 1, 5, 0, 1, 1, 4, 1, 2, 0, 3, 1
Offset: 1

Views

Author

Antti Karttunen, Jun 13 2024

Keywords

Crossrefs

Cf. also A065339, A083025.
Differs from A257991 for the first time at n=29, where a(29) = 1, while A257991(29) = 0.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 3] == 2, e, 0]; f[3, e_] := 0; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jun 17 2024 *)
  • PARI
    A373592(n) = sum(i=1, #n=factor(n)~, (2==n[1, i]%3)*n[2, i]); \\ After code in A083025

Formula

a(n) = A001222(A343430(n)).
a(n) = A001222(n) - (A007949(n)+A373591(n)).
Totally additive with a(3) = 0, a(p) = 1 if p == 2 (mod 3), and a(p) = 0 if p == 1 (mod 3). - Amiram Eldar, Jun 17 2024