A156828 a(1) = 2. a(n) = the smallest prime >= a(n-1) + 4.
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
Offset: 1
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A156829.
Programs
-
Magma
[n le 1 select 2 else NextPrime(Self(n-1)+3): n in [1..60]]; // Vincenzo Librandi, Dec 21 2018
-
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 *)
Extensions
More terms from R. J. Mathar, Feb 21 2009
Comments