OFFSET
1,15
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
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