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!)
A107279 a(n) = 1 if n is an odd prime, a(n) = 2 if n is a nonzero even number, otherwise a(n) = 0. 1
0, 0, 2, 1, 2, 1, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
Table[ If[n==0, 0, If[EvenQ[n], 2, If[PrimeQ[n], 1, 0]]], {n, 0, 99}] (* James C. McMahon, Feb 10 2024 *)
PROG
(Scheme) (define (A107279 n) (cond ((<= n 1) 0) ((even? n) 2) (else (A010051 n)))) ;; Antti Karttunen, Sep 14 2017
CROSSREFS
Sequence in context: A045888 A335885 A335875 * A078461 A341945 A280535
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, May 19 2005
EXTENSIONS
Description corrected by Antti Karttunen, Sep 14 2017
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 March 29 10:59 EDT 2024. Contains 371277 sequences. (Running on oeis4.)