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!)
A071899 a(0)=1 and for n>0: a(n) = least prime>a(n-1) of form 1+k*n. 2
1, 2, 3, 7, 13, 31, 37, 43, 73, 109, 131, 199, 229, 313, 337, 421, 433, 443, 487, 571, 601, 631, 661, 691, 769, 1051, 1093, 1297, 1373, 1451, 1471, 1489, 1601, 1783, 1871, 2311, 2341, 2591, 2699, 2731, 2801, 2953, 3067, 3527, 3697, 4051 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
n=5: in the sequence 1+k*5: 6,11,16,21,26,31,36,41,... the first prime >13=a(4) is 31, therefore a(5)=31.
MATHEMATICA
a[0] = 1; a[1] = 2; a[n_] := a[n] = (p = NextPrime[a[n-1]]; While[True, If[Mod[p, n] == 1, Break[], p = NextPrime[p]]]; p); Table[a[n], {n, 0, 45}] (* Jean-François Alcover, Oct 10 2011 *)
lp[{n_, p_}]:=Module[{np=NextPrime[p]}, While[!IntegerQ[(np-1)/(n+1)], np= NextPrime[np]]; {n+1, np}]; Transpose[NestList[lp, {0, 1}, 50]][[2]] (* Harvey P. Dale, May 12 2015 *)
CROSSREFS
Sequence in context: A048456 A333313 A262829 * A242389 A102644 A014234
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Jun 12 2002
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 April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)