|
|
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
|
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))):
|
|
MATHEMATICA
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|