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!)
A144717 a(n) = smallest positive integer > a(n-1) such that 2*a(1)*a(2)*...*a(n) + 1 is prime. 12
1, 2, 3, 5, 7, 8, 9, 11, 12, 14, 17, 20, 24, 30, 34, 44, 72, 85, 86, 92, 115, 122, 125, 132, 142, 150, 161, 162, 181, 186, 198, 224, 248, 252, 282, 283, 290, 307, 319, 321, 344, 350, 376, 445, 476, 567, 623, 676, 682, 704, 741, 749, 786, 803, 806, 893, 1014, 1046 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..505 (lists all terms < 10^5)
EXAMPLE
a(1)=1 because a(0) is not defined and 2*1 + 1 = 3 is prime;
a(2)=2 because 2*1*2 + 1 = 5 is prime;
a(3)=3 because 2*1*2*3 + 1 = 13 is prime;
a(4) is not 4 because 2*1*2*3*4 + 1 = 49 is not prime, but a(4)=5 works because 2*1*2*3*5 + 1 = 61 is prime.
MATHEMATICA
k = 2; a = {}; Do[If[PrimeQ[k n + 1], k = k n; AppendTo[a, n]], {n, 1, 3000}]; a (* Artur Jasinski *)
nxt[{p_, a_}]:=Module[{k=a+1}, While[!PrimeQ[p*k+1], k++]; {p*k, k}]; NestList[ nxt, {2, 1}, 60][[All, 2]] (* Harvey P. Dale, Aug 18 2021 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
an, p = 1, 2
while True:
yield an
an = next(k for k in count(an+1) if isprime(p*k+1))
p *= an
print(list(islice(agen(), 58))) # Michael S. Branicky, Jan 13 2023
CROSSREFS
Sequence in context: A350799 A246438 A158791 * A202728 A244016 A186042
KEYWORD
nonn,nice
AUTHOR
Artur Jasinski, Sep 19 2008
EXTENSIONS
Edited by N. J. A. Sloane, Sep 21 2017 following suggestions from Richard C. Schroeppel
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 March 28 14:21 EDT 2024. Contains 371254 sequences. (Running on oeis4.)