login
A346623
a(n) = Sum_{ x <= n : x odd and omega(x) = 2 } x.
3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 69, 69, 104, 104, 104, 104, 143, 143, 143, 143, 143, 143, 188, 188, 188, 188, 188, 188, 239, 239, 239, 239, 294, 294, 351, 351, 351, 351, 351, 351, 414, 414, 479, 479, 479, 479
OFFSET
1,15
LINKS
MAPLE
a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
`if`(n::odd and nops(ifactors(n)[2])=2, n, 0))
end:
seq(a(n), n=1..68); # Alois P. Heinz, Aug 23 2021
MATHEMATICA
a[n_] := a[n] = If[n == 1, 0, a[n-1] + If[OddQ[n] && PrimeNu[n] == 2, n, 0]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 13 2023 *)
PROG
(Python)
from sympy import primefactors
def A346623(n):
return 0 if n <= 2 else A346623(n-1) + (n if n % 2 and len(primefactors(n)) == 2 else 0) # Chai Wah Wu, Aug 23 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 23 2021
STATUS
approved