OFFSET
1,1
COMMENTS
From Robert Israel, Jun 24 2020: (Start)
The alternating sum must consist of more than two terms, and a(n) is the absolute value of that alternating sum.
Is the sequence increasing? For k <= 99999, a(k+1) >= a(k)+14. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(x) = Sum_{(-1)^n (An) with n = (0, 1, 2..m)}.
EXAMPLE
a(1)=3 because the absolute value of the alternating sum (-1)^n (An) where An = (2, 3, 5, 7) with n = (0,1,2,3), is prime; a(2)=19 because the absolute value of the alternating sum (-1)^n (An) where An = (11, 13, 17, 19, 23) with n = (0, 1, 2, 3), is prime; a(3)=37 because the absolute value of the alternating sum (-1)^n (An) where An = (29, 31, 37, 41, 43) with n = (0, 1, 2, 3, 4) is prime.
MAPLE
p:= 1: R:= NULL:
for count from 1 to 50 do
q:= nextprime(p); p:= nextprime(q); t:= q-p;
e:= 1;
do p:= nextprime(p);
t:= t + e*p;
e:= -e;
until isprime(abs(t));
R:= R, abs(t);
od:
R; # Robert Israel, Jun 23 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Fabio Mercurio, Dec 27 2012
EXTENSIONS
More terms from Robert Israel, Jun 24 2020
STATUS
approved