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!)
A296028 Characteristic function of primes in the nonmultiples of 3. 1
0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
FORMULA
From David A. Corneth, Dec 03 2017: (Start)
a(n) = A010051(A001651(n)).
a(n) = 1 if (6n - 3 - (-1)^n)/4 is prime, otherwise a(n) = 0. (End)
EXAMPLE
a(2) = 1 because the 2nd nonmultiple of 3 is 2, which is prime.
MAPLE
f:= n -> charfcn[{true}](isprime(floor((3*n-1)/2))):
map(f, [$1..1000]); # Robert Israel, Jan 24 2018
MATHEMATICA
Array[Boole@ PrimeQ@ Floor[(3 # - 1)/2] &, 105] (* Michael De Vlieger, Dec 03 2017 *)
PROG
(PARI) a(n) = isprime(floor((3*n-1)/2)) \\ Iain Fox, Dec 03 2017
(PARI) first(n) = {my(inc = t = 1, res = vector(n)); for(i = 1, n, res[i] = isprime(t); t += inc; inc = 3-inc); res} \\ David A. Corneth, Dec 03 2017
CROSSREFS
Sequence in context: A189017 A189132 A189203 * A165263 A108737 A165221
KEYWORD
nonn
AUTHOR
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 April 27 12:00 EDT 2024. Contains 372019 sequences. (Running on oeis4.)