login
A255887
a(n) = 1 if the n-th prime is the sum of three squares, otherwise a(n) = 0.
0
1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1
OFFSET
1
EXAMPLE
Prime(10) = 29 = 2^2 + 3^2 + 4^2, so a(10) = 1.
MATHEMATICA
a[n_] := If[n == 2, 1, If[Mod[Prime[n], 8] == 7, 0, 1]]; Array[a, 100]
CROSSREFS
Sequence in context: A285671 A267773 A325321 * A359473 A181183 A295316
KEYWORD
nonn
AUTHOR
STATUS
approved