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!)
A351140 a(1) = 1, a(n) = smallest prime > a(n-1) + n. 1
1, 5, 11, 17, 23, 31, 41, 53, 67, 79, 97, 113, 127, 149, 167, 191, 211, 233, 257, 281, 307, 331, 359, 389, 419, 449, 479, 509, 541, 577, 613, 647, 683, 719, 757, 797, 839, 881, 929, 971, 1013, 1061, 1109, 1163, 1213, 1277, 1327, 1381, 1433, 1487, 1543, 1597 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The sequence with >= in place of > is essentially the same after the first three terms: 1, 3, 7, 11, 17, 23, 31, ...
LINKS
EXAMPLE
The smallest prime above 1+2 is 5, so a(2)=5.
The smallest prime above 5+3 is 11, so a(3)=11.
MAPLE
R:= 1: p:= 1:
for n from 2 to 100 do
p:= nextprime(p+n);
R:= R, p;
od:
R; # Robert Israel, Nov 20 2023
MATHEMATICA
a[1] = 1; a[n_] := a[n] = NextPrime[a[n - 1] + n]; Array[a, 50] (* Amiram Eldar, Feb 03 2022 *)
PROG
(Python)
from sympy import nextprime
p = 1
for i in range(2, 1000):
print(p, end=", ")
p = nextprime(p+i)
(PARI) lista(nn) = my(list = List(), last = 1); listput(list, last); for (n=2, nn, last = nextprime(last + n +1); listput(list, last); ); Vec(list); \\ Michel Marcus, Feb 03 2022
CROSSREFS
Sequence in context: A184525 A252596 A096448 * A365809 A147305 A049755
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Feb 02 2022
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 September 15 13:23 EDT 2024. Contains 375938 sequences. (Running on oeis4.)