The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
3, 7, 23, 199, 139, 467, 293, 1951, 1259, 2179, 3739, 3271, 12011, 45779, 18869, 14107, 62233, 27143, 34981, 44293, 102701, 25471, 91033, 117443, 107377, 445363, 181303, 153001, 399793, 195599, 273367, 531383, 537413, 633667, 302329, 576791 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
Min_{p | p mod (nextprime(p) - p) = 2n-1};
a(n) is the least prime with A000040(n) mod A001223(n) = 2n-1.
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
Sequence in context: A113824 A121883 A262264 * A343815 A090188 A001773
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 21 2001
EXTENSIONS
Offset 1 by Michel Marcus, Jul 09 2018
STATUS
approved

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 May 20 11:55 EDT 2024. Contains 372712 sequences. (Running on oeis4.)