The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346622 a(n) = card{ x <= n : x odd and omega(x) = 2 }. 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,21
LINKS
MAPLE
a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
`if`(n::odd and nops(ifactors(n)[2])=2, 1, 0))
end:
seq(a(n), n=1..87); # Alois P. Heinz, Aug 23 2021
MATHEMATICA
a[n_] := a[n] = If[n==0, 0, a[n-1]+If[OddQ[n] && PrimeNu[n]==2, 1, 0]];
Table[a[n], {n, 1, 87}] (* Jean-François Alcover, Apr 07 2022 *)
nxt[{n_, a_}]:={n+1, If[EvenQ[n]&&PrimeNu[n+1]==2, 1, 0]+a}; NestList[nxt, {1, 0}, 90][[All, 2]] (* Harvey P. Dale, Oct 05 2022 *)
PROG
(Python)
from sympy import primefactors
def A346622(n):
return 0 if n <= 2 else A346622(n-1) + (1 if n % 2 and len(primefactors(n)) == 2 else 0) # Chai Wah Wu, Aug 23 2021
CROSSREFS
Sequence in context: A082996 A094382 A146167 * A103380 A309120 A098708
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 23 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 00:46 EDT 2024. Contains 372528 sequences. (Running on oeis4.)