A079260 Characteristic function of primes of form 4n+1 (1 if n is prime of form 4n+1, 0 otherwise).
0, 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, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Index entries for characteristic functions
Programs
-
Haskell
a079260 n = fromEnum $ n `mod` 4 == 1 && a010051 n == 1 -- Reinhard Zumkeller, Oct 06 2011
-
Mathematica
Table[If[PrimeQ[n]&&IntegerQ[(n-1)/4],1,0],{n,120}] (* Harvey P. Dale, Jul 14 2015 *)
-
PARI
{ a(n)=if(n%4==1,isprime(n)) }; vector(100,n,a(n))
Comments