login
This site is supported by donations 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

Table of n, a(n) for n=1..105.

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

Cf. A001651, A010051, A045344.

Sequence in context: A189017 A189132 A189203 * A165263 A108737 A165221

Adjacent sequences:  A296025 A296026 A296027 * A296029 A296030 A296031

KEYWORD

nonn

AUTHOR

Martin Michael Musatov, Dec 03 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 22:34 EDT 2019. Contains 328335 sequences. (Running on oeis4.)