The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A105661 a(n)=1 if n is a prime, 2 if n is an even semiprime, otherwise 0. 3
 0, 1, 1, 2, 1, 2, 1, 0, 0, 2, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 LINKS Antti Karttunen, Table of n, a(n) for n = 1..10000 EXAMPLE a(3) = 1 because n = 3 is a prime; a(4) = 2 because n = 4 = 2*2 is an even semiprime; a(8) = 0 because n = 8 is neither prime nor an even semiprime. a(15) = 0 because n = 15 = 3*5 is an odd semiprime. MATHEMATICA Table[Which[PrimeQ[n], 1, EvenQ[n]&&PrimeOmega[n]==2, 2, True, 0], {n, 120}] (* Harvey P. Dale, Jul 05 2021 *) PROG (PARI) for(n=1, 105, if((n%2==0)&&(bigomega(n)==2), r=2, r=isprime(n)); print1(r, ", ")) (Scheme) (define (A105661 n) (cond ((= 1 (A001222 n)) 1) ((and (even? n) (= 2 (A001222 n))) 2) (else 0))) ;; Antti Karttunen, Jul 26 2017 CROSSREFS Cf. A001222, A001751, A105700. Sequence in context: A337518 A073781 A048622 * A082451 A121362 A234694 Adjacent sequences: A105658 A105659 A105660 * A105662 A105663 A105664 KEYWORD easy,nonn AUTHOR Giovanni Teofilatto, May 04 2005 EXTENSIONS Corrected and extended by Rick L. Shepherd, May 17 2005 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.

Last modified April 20 12:25 EDT 2024. Contains 371844 sequences. (Running on oeis4.)