A366533 Sum of even prime indices of n divided by 2.
0, 0, 1, 0, 0, 1, 2, 0, 2, 0, 0, 1, 3, 2, 1, 0, 0, 2, 4, 0, 3, 0, 0, 1, 0, 3, 3, 2, 5, 1, 0, 0, 1, 0, 2, 2, 6, 4, 4, 0, 0, 3, 7, 0, 2, 0, 0, 1, 4, 0, 1, 3, 8, 3, 0, 2, 5, 5, 0, 1, 9, 0, 4, 0, 3, 1, 0, 0, 1, 2, 10, 2, 0, 6, 1, 4, 2, 4, 11, 0, 4, 0, 0, 3, 0, 7
Offset: 1
Keywords
Examples
The prime indices of 198 are {1,2,2,5}, so a(198) = (2+2)/2 = 2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
f:= proc(n) local F,t; F:= map(t -> [numtheory:-Pi(t[1]),t[2]], ifactors(n)[2]); add(`if`(t[1]::even, t[1]*t[2]/2, 0), t=F) end proc: map(f, [$1..100]); # Robert Israel, Nov 22 2023
-
Mathematica
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; Table[Total[Select[prix[n],EvenQ]]/2,{n,100}]
Formula
a(n) = A366531(n)/2.
Comments