The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A342156 For n > 2, a(n) = 0,1,2, or 3 when (prime(n+1) mod 6, prime(n) mod 6) = (1,1),(1,5),(5,1), or (5,5), respectively. 2
 1, 2, 1, 2, 1, 2, 3, 1, 0, 2, 1, 2, 3, 3, 1, 0, 2, 1, 0, 2, 3, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, 2, 1, 0, 0, 2, 3, 3, 1, 2, 1, 2, 1, 0, 0, 2, 1, 2, 3, 1, 2, 3, 3, 3, 1, 0, 2, 1, 2, 1, 2, 1, 2, 1, 0, 2, 1, 2, 3, 1, 0, 0, 2, 3, 1, 2, 1, 2, 1, 2, 1, 0, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 3, 1, 0, 0, 2, 3, 3, 1, 0, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 3,2 COMMENTS Let p=prime(n), q=prime(n+1). There are only 4 possible combinations for pairs of consecutive primes modulo 6: .   a(n)|   q  |   p  |    q-p    | (q-p) mod 6 | (q-p) mod 3   ----+------+------+-----------+-------------+------------     0 | 6m+1 | 6k+1 | 6*(m-k)   |      0      |      0     1 | 6m+1 | 6k+5 | 6*(m-k)-4 |   -4 or 2   |   -1 or 2     2 | 6m+5 | 6k+1 | 6*(m-k)+4 |      4      |      1     3 | 6m+5 | 6k+5 | 6*(m-k)   |      0      |      0 . for some positive integers n,m,k. For triples of consecutive primes p,q,s, there are only 8 possible combinations: .   {a(n),a(n+1)} | s=prime(n+2) | q=prime(n+1) | p=prime(n)   --------------+--------------+--------------+-----------       {0,0}     |     6r+1     |     6m+1     |    6k+1       {2,1}     |     6r+1     |     6m+5     |    6k+1       {1,0}     |     6r+1     |     6m+1     |    6k+5       {3,1}     |     6r+1     |     6m+5     |    6k+5       {0,2}     |     6r+5     |     6m+1     |    6k+1       {2,3}     |     6r+5     |     6m+5     |    6k+1       {1,2}     |     6r+5     |     6m+1     |    6k+5       {3,3}     |     6r+5     |     6m+5     |    6k+5 . Then are only 8 possible pairs of consecutive terms {a(n), a(n+1)}: {0,0}, {0,2}, {1,0}, {1,2}, {2,1}, {2,3}, {3,1}, {3,3}; 8 pairs of consecutive terms are impossible: {0,1}, {0,3}, {1,1}, {1,3}, {2,0}, {2,2}, {3,0}, {3,2}, which follows the fact that the central prime in each triple can't be congruent to 1 (mod 6) AND congruent to 5 (mod 6) (it is congruent either to 1 or 5 (mod 6). We can create a dichotomic graph structure for triples, quadruples, ... and so on to infinity; every time we have that same number 2^k possible and 2^k impossible cases. set possible pairs {0,0},{0,2},{1,0},{1,2},{2,1},{2,3},{3,1},{3,3} reduced modulo 3 to {0,0},{0,-1},{1,0},{1,-1},{-1,1},{-1,0},{0,1},{0,0} and different are {0,0},{0,1},{0,-1},{1,0},{1,-1},{-1,1},{-1,0} set impossible pairs {0,1},{0,3},{1,1},{1,3},{2,0},{2,2},{3,0},{3,2} reduced modulo 3 to {0,1},{0,0},{1,1},{1,0},{-1,0},{-1,-1},{0,0},{0,1} and different are {0,1},{0,0},{1,1},{1,0},{-1,0},{-1,-1} Theorem B in A341952 is proved on the basis of the above. Because Theorem A in A341765 is equivalent, Theorem B in A341952 also is proved that same way. LINKS FORMULA A341765(n+1) = a(n) mod 3 and later we change 2 -> -1. EXAMPLE a(1)=1 because (note that offset is 3 and primes 2,3 are excluded) prime(3+1) = 7 == 1 (mod 6) and prime(3) = 5 == 5 (mod 6), which is the case in which a(n)=1. MATHEMATICA pp = {}; Do[If[Mod[Prime[n + 1], 6] == 1 && Mod[Prime[n], 6] == 1, AppendTo[pp, 0], If[Mod[Prime[n + 1], 6] == 5 && Mod[Prime[n], 6] == 1, AppendTo[pp, 2], If[Mod[Prime[n + 1], 6] == 1 && Mod[Prime[n], 6] == 5, AppendTo[pp, 1], If[Mod[Prime[n + 1], 6] == 5 && Mod[Prime[n], 6] == 5, AppendTo[pp, 3]]]]], {n, 3, 108}]; pp CROSSREFS Cf. A341765, A341952. Sequence in context: A328771 A279371 A134156 * A324884 A067815 A133780 Adjacent sequences:  A342153 A342154 A342155 * A342157 A342158 A342159 KEYWORD nonn AUTHOR Artur Jasinski, Mar 02 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 24 05:38 EDT 2021. Contains 348217 sequences. (Running on oeis4.)