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.

A378880 a(n) = A378879(n) - A083025(n).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 14 2025

Keywords

Examples

			a(10) = 0 because the factorization 2*5 has 1 each of a Pythagorean prime, 5, and a non-Pythagorean prime, 2.
		

Crossrefs

Programs

  • Mathematica
    f[{x_, y_}] := If[Mod[x, 4] == 1, y, -y];
    s[n_] := Map[f, FactorInteger[n]];
    p[n_] := {Total[Select[s[n], # > 0 &]], -Total[Select[s[n], # < 0 &]]};
    p[1] = {0, 0};
    t = Table[p[n], {n, 1, 135}]
    u = Map[First, t]   (* A083025 *)
    v = Map[Last, t]   (* A378879 *)
    v - u (* A377625 *)

Formula

Totally additive with a(p) = 1 if p = 2 or p == 3 (mod 4), and a(p) = -1 if p == 1 (mod 4). - Amiram Eldar, Jun 09 2025