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.

A368647 The number of distinct primes of the form 3*k+2 dividing n minus the number of distinct primes of the form 3*k+1 dividing n.

This page as a plain text file.
%I A368647 #7 Jan 02 2024 02:44:08
%S A368647 0,1,0,1,1,1,-1,1,0,2,1,1,-1,0,1,1,1,1,-1,2,-1,2,1,1,1,0,0,0,1,2,-1,1,
%T A368647 1,2,0,1,-1,0,-1,2,1,0,-1,2,1,2,1,1,-1,2,1,0,1,1,2,0,-1,2,1,2,-1,0,-1,
%U A368647 1,0,2,-1,2,1,1,1,1,-1,0,1,0,0,0,-1,2,0,2
%N A368647 The number of distinct primes of the form 3*k+2 dividing n minus the number of distinct primes of the form 3*k+1 dividing n.
%H A368647 Amiram Eldar, <a href="/A368647/b368647.txt">Table of n, a(n) for n = 1..10000</a>
%F A368647 Additive with a(p^e) = 0 if p = 3, 1 if p == 2 (mod 3), and -1 if p == 1 (mod 3).
%F A368647 a(n) = A005090(n) - A005088(n).
%F A368647 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A086241 = 0.641944... .
%t A368647 f[p_, e_] := Switch[Mod[p, 3], 0, 0, 1, -1, 2, 1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
%o A368647 (PARI) a(n) = {my(p = factor(n)[, 1]); sum(i = 1, #p, if(p[i]%3 == 0, 0, if(p[i]%3 == 1, -1, 1)));}
%Y A368647 Cf. A002476, A003627, A005094, A005088, A005090, A086241.
%K A368647 sign,easy
%O A368647 1,10
%A A368647 _Amiram Eldar_, Jan 02 2024