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!)
A060235 Smallest primes whose residue modulo its difference from the next prime is 2n-1. 0

%I #18 Aug 07 2019 18:00:03

%S 3,7,23,199,139,467,293,1951,1259,2179,3739,3271,12011,45779,18869,

%T 14107,62233,27143,34981,44293,102701,25471,91033,117443,107377,

%U 445363,181303,153001,399793,195599,273367,531383,537413,633667,302329,576791

%N Smallest primes whose residue modulo its difference from the next prime is 2n-1.

%F Min_{p | p mod (nextprime(p) - p) = 2n-1};

%F a(n) is the least prime with A000040(n) mod A001223(n) = 2n-1.

%e The residue p mod d = 5 = 2*3 - 1 for primes {23, 57, 53, 83, ...} of which the first one is 23, so a(3)=23.

%t Module[{nn=100000,pm},pm={#[[1]],Mod[#[[1]],#[[2]]-#[[1]]]}&/@Partition[ Prime[Range[nn]],2,1];Table[SelectFirst[pm,#[[2]]==2n-1&],{n,40}]] [[All, 1]] (* _Harvey P. Dale_, Aug 07 2019 *)

%o (PARI) a(n) = {my(p = 2); forprime(q=3, ,if (q % (q-p) == (2*n-1), return (p)); p = q;);} \\ _Michel Marcus_, Jul 09 2018

%Y Cf. A000040, A001223.

%K nonn

%O 1,1

%A _Labos Elemer_, Mar 21 2001

%E Offset 1 by _Michel Marcus_, Jul 09 2018

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 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)