A324966 Number of distinct odd prime indices of n.
0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 1, 0, 1, 0, 2, 1, 1, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 1, 1, 0, 2, 1, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 2, 0, 1, 1, 2, 1, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 0
Offset: 1
Examples
180180 has prime indices {1,1,2,2,3,4,5,6}, so a(180180) = 3.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
f:= proc(n) nops(select(type,map(numtheory:-pi,numtheory:-factorset(n)),odd)) end proc: map(f, [$1..100]); # Robert Israel, Mar 24 2019
-
Mathematica
Table[Count[If[n==1,{},FactorInteger[n]],{?(OddQ[PrimePi[#]]&),}],{n,100}]
-
PARI
a(n) = my(f=factor(n)[,1]); sum(k=1, #f, primepi(f[k]) % 2); \\ Michel Marcus, Mar 22 2019
Formula
G.f.: Sum_{k>=1} x^prime(2*k-1) / (1 - x^prime(2*k-1)). - Ilya Gutkovskiy, Feb 12 2020
Additive with a(p^e) = 1 if primepi(p) is odd and 0 otherwise. - Amiram Eldar, Oct 06 2023
Comments