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!)
A156828 a(1) = 2. a(n) = the smallest prime >= a(n-1) + 4. 3
2, 7, 11, 17, 23, 29, 37, 41, 47, 53, 59, 67, 71, 79, 83, 89, 97, 101, 107, 113, 127, 131, 137, 149, 157, 163, 167, 173, 179, 191, 197, 211, 223, 227, 233, 239, 251, 257, 263, 269, 277, 281, 293, 307, 311, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Apparently a(n) = A025584(n) for all n>2. Verified for indices n <= 100000. - R. J. Mathar, Mar 01 2010
Assume a(n-1) is in A025584 and greater than 3. Then, if a(n) = a(n-1) + 4, a(n-1) + 2 cannot be prime, and a(n) is in A025584. Otherwise, a(n) must still be in A025584, because if it were not, a(n) would not be the smallest valid prime. - Charlie Neder, Dec 16 2018
LINKS
MAPLE
p := 2: for n from 1 to 100 do printf("%d, ", p) ; p := nextprime(p+3) ; od: # R. J. Mathar, Feb 21 2009
MATHEMATICA
a[1] = 2; a[n_] := a[n] = NextPrime[a[n - 1] + 3]; Array[a, 60] (* Amiram Eldar, Dec 16 2018 *)
NestList[NextPrime[#+3]&, 2, 60] (* Harvey P. Dale, Jan 05 2019 *)
PROG
(Magma) [n le 1 select 2 else NextPrime(Self(n-1)+3): n in [1..60]]; // Vincenzo Librandi, Dec 21 2018
CROSSREFS
Cf. A156829.
Sequence in context: A038942 A175283 A124136 * A019385 A075552 A274504
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 16 2009
EXTENSIONS
More terms from R. J. Mathar, Feb 21 2009
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 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)