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!)
A132194 a(n) = 1 if n-th prime is 0 or 2 mod 3, otherwise 0. 2
1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Equivalently, a(n) = 0 if n-th prime is 1 mod 3, otherwise 1. - Wouter Meeussen, May 21 2019
Binary sequence based on the primes: play it at a slower tempo to appreciate the irregularities.
LINKS
FORMULA
a(n) = 1-A099618(n). - R. J. Mathar, Jun 06 2019
MAPLE
a := n -> 1 - irem(modp(ithprime(n), 3), 2):
seq(a(n), n = 1..105); # Peter Luschny, May 21 2019
MATHEMATICA
Table[If[Mod[Prime[n], 3]== 1, 0, 1], {n, 200}] (* Harvey P. Dale, May 21 2019 *)
PROG
(PARI) {a(n) = if(prime(n)%3==1, 0, 1)}; \\ G. C. Greubel, May 21 2019
(Magma) [(NthPrime(n) mod 3) eq 1 select 0 else 1: n in [1..200]]; // G. C. Greubel, May 21 2019
(Sage)
def a(n):
if (mod(nth_prime(n), 3)==1): return 0
else: return 1
[a(n) for n in (1..200)] # G. C. Greubel, May 21 2019
CROSSREFS
Sequence in context: A335909 A266591 A359779 * A354034 A174897 A316441
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Nov 05 2007
EXTENSIONS
Definition corrected by Harvey P. Dale, May 21 2019
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 28 14:33 EDT 2024. Contains 371254 sequences. (Running on oeis4.)