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!)
A101040 If n has one or two prime-factors then 1 else 0. 9
0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(A033942(n))=0; for n>1: a(A037143(n))=1;
a(A000040(n))=1; a(A001358(n))=1;
A101041(n) = Sum(a(k): 1<=k<=n) + 1.
Primes counted with multiplicity. - Harvey P. Dale, Feb 16 2024
LINKS
FORMULA
a(n) = A010051(n)+A064911(n) = 0^floor(A001222(n)/3)-0^(n-1).
a(1) = 0; for n > 1, a(n) = A063524(A032742(A032742(n))). - Antti Karttunen, Nov 23 2017
MATHEMATICA
a[n_] := If[n == 1, 0, Boole[PrimeOmega[n] <= 2]];
Array[a, 105] (* Jean-François Alcover, Dec 02 2021 *)
PROG
(Scheme) (define (A101040 n) (if (= 1 n) 0 (A063524 (A032742 (A032742 n))))) ;; Antti Karttunen, Nov 23 2017
(PARI) vector(105, k, bigomega(k)<=2&&k>1) \\ Hugo Pfoertner, Dec 02 2021
CROSSREFS
Characteristic function of A037143 (without its initial term 1).
Sequence in context: A135947 A360123 A211487 * A341591 A306453 A175629
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 28 2004
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 13 09:49 EDT 2024. Contains 372504 sequences. (Running on oeis4.)