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.

A373591 Number of primes congruent to 1 modulo 3 dividing n (with multiplicity).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 13 2024

Keywords

Crossrefs

Programs

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

Formula

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