OFFSET
1,1
COMMENTS
This sequence gives another proof that there are infinitely many primes. Let N = Product_{1<=i<n} (Product_{1<=k<=i} p_k + Product_{i<k<=n} p_k). Suppose there are only a finite number of primes p_i, 1<=i<=n. If N is prime, then for all i, not(N=p_i). Because, for all i, p_i<N. If N is composite, then it must have a prime divisor p which is different from primes p_i. Because, for all i, not(N==0 mod p_i).
a(1) could also be chosen to be 1.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..29
MAPLE
a:=n->mul(mul(ithprime(k), k=1..i)+mul(ithprime(k), k=i+1..n), i=1..n-1): 2, seq(a(n), n=2..10); # Muniru A Asiru, Dec 06 2018
MATHEMATICA
Join[{2}, Rest[f[n_]:=Product[(Product[Prime[k], {k, i}] + Product[Prime[k], {k, i + 1, n}]), {i, n - 1}]; Array[f, 10] ]] (* Robert G. Wilson v, Nov 12 2005 *)
PROG
(PARI) t=10; for(n=2, t, print1(prod(i=1, n-1, prod(k=1, i, prime(k)) + prod(k=i+1, n, prime(k))), ", ")); \\ Gerald McGarvey, Nov 12 2005
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Yasutoshi Kohmoto, Nov 08 2005
EXTENSIONS
Corrected and extended by Gerald McGarvey and Robert G. Wilson v, Nov 12 2005
STATUS
approved