A088683 a(n) = prime(3*n+2) - prime(3*n).
6, 6, 8, 6, 12, 10, 10, 12, 6, 18, 12, 12, 12, 12, 14, 6, 8, 12, 8, 12, 6, 20, 6, 14, 10, 12, 12, 10, 12, 16, 12, 18, 24, 12, 16, 8, 10, 22, 10, 14, 14, 18, 12, 14, 12, 22, 12, 12, 6, 18, 24, 18, 10, 18, 14, 16, 12, 16, 12, 22, 10, 14, 24, 18, 14, 10, 8, 28, 10, 10, 16, 40, 14, 24, 6
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[NthPrime(3*n+2) - NthPrime(3*n): n in [1..80]]; // G. C. Greubel, May 19 2019
-
Mathematica
#[[3]]-#[[1]]&/@Partition[Prime[Range[3,300]],3] (* Harvey P. Dale, Jan 12 2011 *)
-
PARI
a(n) = prime(3*n+2) - prime(3*n); \\ Michel Marcus, Oct 05 2013
-
Sage
[nth_prime(3*n+2) - nth_prime(3*n) for n in (1..80)] # G. C. Greubel, May 19 2019
Formula
Partition primes in triples starting with 5: {5, 7, 11}, {13, 17, 19}, {23, 29, 31}, {37, 41, 43}, {47, 53, 59}, {61, 67, 71}, {73, 79, 83}, {89, 97, 101}, {103, 107, 109}. Sequence gives differences between lesser and larger primes in triples.
Extensions
New name from Michel Marcus, Oct 05 2013
Comments