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!)
A226534 q + p - 1 mod q - p + 1 where p, q are consecutive primes. 2

%I #16 Mar 16 2023 09:17:58

%S 0,1,2,2,2,4,2,1,2,2,4,2,2,4,1,6,2,1,2,2,4,1,3,5,2,2,4,2,1,14,2,1,2,1,

%T 2,6,4,4,3,1,2,8,2,4,2,6,4,4,2,1,2,2,7,3,1,6,2,1,2,2,3,14,2,2,4,2,2,1,

%U 2,1,4,5,4,2,1,1,2,2,8,2,2,4,2,3,1,2,5,2,2,4,9,2,2,8,1,3,2

%N q + p - 1 mod q - p + 1 where p, q are consecutive primes.

%C p(n + 1) + p(n) - 1 mod p(n + 1) - p(n) + 1 where p(n) is n-th prime.

%H Harvey P. Dale, <a href="/A226534/b226534.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A076273(n + 1) mod A076368(n + 1).

%e 0 is in the sequence because (3 + 2 - 1 mod 3 - 2 + 1) = (4 mod 2) = 0 where 2, 3 are consecutive primes.

%t Table[Mod[Prime[p + 1] + Prime[p] - 1, Prime[p + 1] - Prime[p] + 1], {p, 100}] (* _Alonso del Arte_, Jan 18 2014 *)

%t Mod[Total[#]-1,#[[2]]-#[[1]]+1]&/@Partition[Prime[Range[100]],2,1] (* _Harvey P. Dale_, Mar 16 2023 *)

%o (PARI) a(n)=lift(Mod(prime(n+1)+prime(n)-1,prime(n+1)-prime(n)+1)) /* _Ralf Stephan_, Sep 03 2013 */

%K nonn,easy

%O 1,3

%A _Juri-Stepan Gerasimov_, Aug 31 2013

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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)