A054763 Residues of consecutive prime differences modulo 6.
1, 2, 2, 4, 2, 4, 2, 4, 0, 2, 0, 4, 2, 4, 0, 0, 2, 0, 4, 2, 0, 4, 0, 2, 4, 2, 4, 2, 4, 2, 4, 0, 2, 4, 2, 0, 0, 4, 0, 0, 2, 4, 2, 4, 2, 0, 0, 4, 2, 4, 0, 2, 4, 0, 0, 0, 2, 0, 4, 2, 4, 2, 4, 2, 4, 2, 0, 4, 2, 4, 0, 2, 0, 0, 4, 0, 2, 4, 2, 4, 2, 4, 2, 0, 4, 0, 2, 4, 2, 4, 0, 2, 4, 2, 4, 0, 0, 2, 0, 0, 4, 0, 0, 2, 0
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A001223.
Programs
-
Mathematica
Mod[#, 6] & /@ Differences@ Prime@ Range@ 105 (* Michael De Vlieger, Mar 05 2017 *)
-
PARI
a(n) = (prime(n+1) - prime(n)) % 6; \\ Michel Marcus, Dec 17 2013
Formula
a(n) = A001223(n) mod 6.
Comments