The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A046966 a(n) is the smallest number > a(n-1) such that a(1)*a(2)*...*a(n) + 1 is prime. 20
 1, 2, 3, 5, 6, 9, 12, 16, 22, 25, 29, 31, 35, 47, 57, 61, 66, 79, 81, 108, 114, 148, 163, 172, 185, 198, 203, 205, 236, 265, 275, 282, 294, 312, 344, 359, 377, 397, 398, 411, 427, 431, 493, 512, 589, 647, 648, 660, 708, 719, 765, 887, 911, 916, 935, 1062, 1093 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 REFERENCES H. Dubner, Recursive Prime Generating Sequences, Table 4 pp. 173 Journal of Recreational Mathematics 29(3) 1998 Baywood NY. LINKS Charles R Greathouse IV and T. D. Noe, Table of n, a(n) for n = 1..500 (first 200 terms from Noe) EXAMPLE 1*2*3*5 + 1 = 31 is prime. MAPLE P:= proc(i) local a, k, n, m: a:=[1]: m:= 1: for n from 2 to i do if isprime(m*n+1) then a:=[op(a), n]: m:= m*n fi: od: a; end: P(1093); # Paolo P. Lava, Jan 01 2019 MATHEMATICA a[1] = 1; p[1] = 1; a[n_] := a[n] = For[an = a[n-1] + 1, True, an++, pn = p[n-1]*an; If[ PrimeQ[pn+1], p[n] = pn; Return[an] ] ]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Sep 17 2012 *) Module[{cc={1}, k}, Do[k=Last[cc]+1; While[!PrimeQ[Times@@Join[cc, {k}]+1], k++]; AppendTo[cc, k], {60}]; cc] (* Harvey P. Dale, Jan 21 2013 *) PROG (PARI) first(n)=my(v=vector(n), N=1, t=1); v[1]=1; for(k=2, n, while(!ispseudoprime(1 + N*t++), ); N*=v[k]=t); v \\ Charles R Greathouse IV, Apr 07 2020 CROSSREFS Cf. A046972. Sequence in context: A008768 A067593 A084993 * A225973 A329165 A292444 Adjacent sequences:  A046963 A046964 A046965 * A046967 A046968 A046969 KEYWORD nonn,nice AUTHOR EXTENSIONS More terms from Jason Earls, Jan 25 2002 Definition corrected by T. D. Noe, Feb 14 2007 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 29 18:27 EDT 2020. Contains 337432 sequences. (Running on oeis4.)