OFFSET
0,3
COMMENTS
Alternating sum of primorial numbers.
abs(a(n)-1) is divisible by 6547 (the 845th prime) for all n >= 844. The only values of n for which abs(a(n)-1) is prime are: 2, 3, 5, 7, 19, 33, 125, 341, 571. The corresponding primes are 2, 13, 1063, 241303, 3871461971508291097188313, 3.576... * 10^52, 1.386... * 10^289, 5.823... * 10^968 and 1.227... * 10^1774. - Amiram Eldar, May 04 2017
LINKS
FORMULA
a(n) mod 5 = 0, for n > 1. - Altug Alkan, Dec 04 2015
EXAMPLE
a(0) = 1;
a(1) = 1 - 2 = -1;
a(2) = 1 - 2 + 2*3 = 5;
a(3) = 1 - 2 + 2*3 - 2*3*5 = -25;
a(4) = 1 - 2 + 2*3 - 2*3*5 + 2*3*5*7 = 185;
a(5) = 1 - 2 + 2*3 - 2*3*5 + 2*3*5*7 - 2*3*5*7*11 = -2125, etc.
MATHEMATICA
Table[Sum[(-1)^k Product[Prime@ j, {j, k}], {k, 0, n}], {n, 0, 18}]
(* Second program: *)
Accumulate@ FoldList[-#1 #2 &, 1, Prime@ Range@ 18] (* Michael De Vlieger, May 04 2017 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Dec 04 2015
STATUS
approved