login
A079261
Characteristic function of primes of form 4n+3 (1 if n is prime of form 4n+3, 0 otherwise).
12
0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
OFFSET
1,1
COMMENTS
Let M(n) denote the n X n matrix m(i,j)=0 if n divides ij-1, m(i,j) = 1 otherwise then det(M(n))=+1 if and only if n is prime ==3 (mod 4).
a(A002145(n)) = 1; a(A145395(n)) = 0. [From Reinhard Zumkeller, Oct 12 2008]
a(n) * A151763(n) = - a(n).
FORMULA
a(n) = - A010051(n) * A011764(n+1). [Reinhard Zumkeller, Oct 06 2011]
PROG
(PARI) { a(n)=isprime(n)*if(n%4-3, 0, 1) }; vector(100, n, a(n))
(Haskell)
a079261 n = fromEnum $ n `mod` 4 == 3 && a010051 n == 1
-- Reinhard Zumkeller, Oct 06 2011
CROSSREFS
Cf. A066490 (partial sums).
Sequence in context: A129272 A059648 A288707 * A354028 A359152 A285495
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 04 2003
STATUS
approved