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.

A378879 a(n) = number of non-Pythagorean primes in the prime factorization of n (including multiplicities).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 14 2025

Keywords

Examples

			a(12) = 3 because 12 = 2*2*3, where 2 (with multiplicity 2) and 3 are non-Pythagorean primes.
		

Crossrefs

Programs

  • Maple
    A378879 := proc(n)
        local a,f ;
        a := 0 ;
        for f in ifactors(n)[2] do
            if op(1, f) mod 4 <> 1 then
                a := a+op(2, f) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A378879(n),n=1..50) ; # R. J. Mathar, Jan 27 2025
  • 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}]
    Map[First, t]   (* A083025 *)
    Map[Last, t]   (* A378879 *)

Formula

From R. J. Mathar, Jan 28 2025: (Start)
a(n) + A083025(n) = A001222(n).
a(n) = A007814(n)+A065339(n). (End)
Totally additive with a(p) = 1 if p = 2 or p == 3 (mod 4), and a(p) = 0 if p == 1 (mod 4). - Amiram Eldar, Jun 09 2025