login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051956 a(n) = smallest number > a(n-1) such that a(1)*a(2)*...*a(n) + 1 and a(1)*a(2)*...*a(n) - 1 are primes. 2
4, 15, 17, 19, 29, 57, 77, 285, 318, 354, 379, 405, 520, 521, 595, 625, 938, 1706, 1738, 2085, 2345, 2817, 4319, 4529, 7005, 8207, 8232, 9451, 9839, 11044, 11170, 12386, 12421, 12722, 14153, 15220, 15371, 17052, 17965, 18279, 18811, 19890, 21628, 22667, 22746 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
a[1] = 4; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, p = Times @@ Array[a, n-1]; If[PrimeQ[k*p+1] && PrimeQ[k*p-1], Print[k]; Return[k]]]; Array[a, 45] (* Jean-François Alcover, Oct 23 2016 *)
PROG
(PARI) lista(nn) = {my (v = vector(nn)); for (n = 1, nn, if (n == 1, p = 1; k = 0; , p = prod(j=1, n-1, v[j]); k = v[n-1]+1); while (! isprime(p*k+1) || ! isprime(p*k-1), k++); v[n] = k; print1(k, ", "); ); } \\ Michel Marcus, Sep 28 2013
CROSSREFS
Sequence in context: A103540 A065159 A240265 * A308983 A032826 A190709
KEYWORD
nice,nonn
AUTHOR
Felice Russo, Dec 21 1999
EXTENSIONS
More terms from Michel Marcus, Sep 28 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)