login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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

%I #25 Mar 17 2021 09:42:51

%S 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,

%T 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,

%U 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

%N 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.

%C Let p=prime(n), q=prime(n+1). There are only 4 possible combinations for pairs of consecutive primes modulo 6:

%C .

%C a(n)| q | p | q-p | (q-p) mod 6 | (q-p) mod 3

%C ----+------+------+-----------+-------------+------------

%C 0 | 6m+1 | 6k+1 | 6*(m-k) | 0 | 0

%C 1 | 6m+1 | 6k+5 | 6*(m-k)-4 | -4 or 2 | -1 or 2

%C 2 | 6m+5 | 6k+1 | 6*(m-k)+4 | 4 | 1

%C 3 | 6m+5 | 6k+5 | 6*(m-k) | 0 | 0

%C .

%C for some positive integers n,m,k.

%C For triples of consecutive primes p,q,s, there are only 8 possible combinations:

%C .

%C {a(n),a(n+1)} | s=prime(n+2) | q=prime(n+1) | p=prime(n)

%C --------------+--------------+--------------+-----------

%C {0,0} | 6r+1 | 6m+1 | 6k+1

%C {2,1} | 6r+1 | 6m+5 | 6k+1

%C {1,0} | 6r+1 | 6m+1 | 6k+5

%C {3,1} | 6r+1 | 6m+5 | 6k+5

%C {0,2} | 6r+5 | 6m+1 | 6k+1

%C {2,3} | 6r+5 | 6m+5 | 6k+1

%C {1,2} | 6r+5 | 6m+1 | 6k+5

%C {3,3} | 6r+5 | 6m+5 | 6k+5

%C .

%C 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).

%C 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.

%C 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}

%C 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}

%C Theorem B in A341952 is proved on the basis of the above.

%C Because Theorem A in A341765 is equivalent, Theorem B in A341952 also is proved that same way.

%F A341765(n+1) = a(n) mod 3 and later we change 2 -> -1.

%e 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.

%t 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

%Y Cf. A341765, A341952.

%K nonn

%O 3,2

%A _Artur Jasinski_, Mar 02 2021

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:38 EDT 2024. Contains 371794 sequences. (Running on oeis4.)