A103271 a(n) = (prime(n)+prime(n+1)) mod 4.
1, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- R. J. Lemke Oliver and K. Soundararajan, Unexpected biases in the distribution of consecutive primes, arXiv:1603.03720 [math.NT], 2016.
Programs
-
Maple
seq(ithprime(n)+ithprime(n+1) mod 4, n=1..150); # Emeric Deutsch, May 31 2005
-
Mathematica
Table[Mod[Prime@ n + Prime[n + 1], 4], {n, 120}] (* Michael De Vlieger, Apr 27 2016 *) Mod[Total[#],4]&/@Partition[Prime[Range[120]],2,1] (* Harvey P. Dale, Mar 16 2025 *)
-
PARI
a(n) = (prime(n) + prime(n+1)) % 4; \\ Michel Marcus, Apr 14 2016
Formula
a(n) = A001043(n) mod 4. - Michel Marcus, Apr 14 2016
Extensions
More terms from Emeric Deutsch, May 31 2005
Prepended a(1) = 1, Joerg Arndt, Apr 14 2016
Comments