OFFSET
1,1
COMMENTS
a(n) is the sum of two prime gaps, thus a(n) >= 4 for n > 1. Conjecturally a(n) << log^2 n (probably with constant around 2). - Charles R Greathouse IV, Aug 25 2014
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
2 + 5 = 7
3 + 7 = 10
5 + 11 = 16
7 + 13 = 20
...
so the sequence is: 10 - 7 = 3,
16 - 10 = 6,
20 - 16 = 4,
28 - 20 = 8,
...
MAPLE
MATHEMATICA
#[[4]]+#[[2]]-#[[3]]-#[[1]]&/@Partition[Prime[Range[90]], 4, 1] (* Harvey P. Dale, May 15 2013 *)
PROG
(PARI) a(n)=my(p=prime(n), q=nextprime(p+1), r=nextprime(q+1)); nextprime(r+1)-r + q-p \\ Charles R Greathouse IV, Aug 25 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Odimar Fabeny, Apr 14 2008
EXTENSIONS
Corrected and extended by R. J. Mathar, Apr 21 2008
STATUS
approved