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

%I #16 Feb 16 2024 14:59:56

%S 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,

%T 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,

%U 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

%N If n has one or two prime-factors then 1 else 0.

%C a(A033942(n))=0; for n>1: a(A037143(n))=1;

%C a(A000040(n))=1; a(A001358(n))=1;

%C A101041(n) = Sum(a(k): 1<=k<=n) + 1.

%C Primes counted with multiplicity. - _Harvey P. Dale_, Feb 16 2024

%H Antti Karttunen, <a href="/A101040/b101040.txt">Table of n, a(n) for n = 1..65537</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>

%F a(n) = A010051(n)+A064911(n) = 0^floor(A001222(n)/3)-0^(n-1).

%F a(1) = 0; for n > 1, a(n) = A063524(A032742(A032742(n))). - _Antti Karttunen_, Nov 23 2017

%t a[n_] := If[n == 1, 0, Boole[PrimeOmega[n] <= 2]];

%t Array[a, 105] (* _Jean-François Alcover_, Dec 02 2021 *)

%o (Scheme) (define (A101040 n) (if (= 1 n) 0 (A063524 (A032742 (A032742 n))))) ;; _Antti Karttunen_, Nov 23 2017

%o (PARI) vector(105,k,bigomega(k)<=2&&k>1) \\ _Hugo Pfoertner_, Dec 02 2021

%Y Characteristic function of A037143 (without its initial term 1).

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Nov 28 2004

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 June 12 12:32 EDT 2024. Contains 373331 sequences. (Running on oeis4.)