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.

A345374 Number of unitary prime divisors of n whose prime index is odd.

This page as a plain text file.
%I A345374 #11 Oct 06 2023 04:56:07
%S A345374 0,1,0,0,1,1,0,0,0,2,1,0,0,1,1,0,1,1,0,1,0,2,1,0,0,1,0,0,0,2,1,0,1,2,
%T A345374 1,0,0,1,0,1,1,1,0,1,1,2,1,0,0,1,1,0,0,1,2,0,0,1,1,1,0,2,0,0,1,2,1,1,
%U A345374 1,2,0,0,1,1,0,0,1,1,0,1,0,2,1,0,2,1,0,1,0,2,0,1,1,2
%N A345374 Number of unitary prime divisors of n whose prime index is odd.
%H A345374 Amiram Eldar, <a href="/A345374/b345374.txt">Table of n, a(n) for n = 1..10000</a>
%F A345374 a(n) = Sum_{p|n, p prime} (pi(p) mod 2) * floor(1/gcd(p,n/p)).
%F A345374 From _Amiram Eldar_, Oct 06 2023: (Start)
%F A345374 a(n) = A056169(n) - A345375(n).
%F A345374 a(n) <= A324966(n), with equality if and only if n is squarefree (A005117).
%F A345374 Additive with a(p^e) = 1 if e = 1 and primepi(p) is odd and 0 otherwise. (End)
%t A345374 f[p_, e_] := If[e == 1 && OddQ[PrimePi[p]], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Oct 06 2023 *)
%o A345374 (PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i,2] == 1 && primepi(f[i,1])%2, 1, 0));} \\ _Amiram Eldar_, Oct 06 2023
%Y A345374 Cf. A000720, A005117, A056169, A324966, A345375.
%K A345374 nonn,easy
%O A345374 1,10
%A A345374 _Wesley Ivan Hurt_, Jun 16 2021