OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (prime(n+2)^2 - prime(n+1)^2 - prime(n+2) - 3*prime(n+1))/2. - Robert Israel, Jul 19 2018
EXAMPLE
a(1) = 4-3 = 1;
a(2) = 6-5 = 1;
a(3) = (8+9+10)-7 = 20;
a(4) = 12-11 = 1;
a(5) = (14+15+16)-13 = 32;
a(6) = 18-17 = 1;
a(7) = (20+21+22)-19 = 44;
a(8) = (24+25+26+27+28)-23 = 107; etc.
MAPLE
Primes:= select(isprime, [2, seq(i, i=3..1000, 2)]):
seq((Primes[i+1]^2-Primes[i+1]-Primes[i]^2-3*Primes[i])/2, i=2..nops(Primes)-1); # Robert Israel, Jul 18 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Claudio Meller, Jun 26 2009
EXTENSIONS
Edited and corrected by Robert Israel, Jul 18 2018
STATUS
approved