login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057459 a(n+1) = smallest prime p in the range a(n) < p < a(1)*a(2)*...*a(n) such that p-1 divides a(1)*a(2)*...*a(n); or if no such prime p exists, then a(n+1) = smallest prime > a(n). 3
2, 3, 5, 7, 11, 23, 31, 43, 47, 67, 71, 139, 211, 283, 311, 331, 431, 463, 659, 683, 691, 863, 947, 967, 1291, 1303, 1319, 1367, 1427, 1699, 1867, 1979, 1987, 2011, 2111, 2131, 2311, 2531, 3011, 3083, 4099, 4423, 4643, 4691, 4831, 5171, 5179, 5683, 5839 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..10000

EXAMPLE

a(3) = 5. Since the product of a(1)*a(2) is 6, there is no prime p < 6 such that p-1 | 6 so the next prime greater than a(2) is 5.

a(9) = 47 since 46 (2*23) | 2*3*5*7*11*23*31*43.

MAPLE

with(numtheory): a:=[2]; P:=1; j:=1;

for n from 2 to 36 do

sw:=-1; P:=P*a[n-1];

  for i from j+1 to 1000 do

  if (ithprime(i)<P) and (P mod (ithprime(i)-1)) = 0 then Q:=ithprime(i); j:=i; sw:=1; break; fi;

                       od:

if sw=-1 then Q:=nextprime(a[n-1]); j:=pi(Q); fi;

a:=[op(a), Q];

od:

a; # N. J. A. Sloane, Feb 13 2017

MATHEMATICA

f[s_List] := Block[{b = Times @@ s, p = NextPrime@ Sort[s][[-1]]}, While[ Mod[b, p -1] > 0 && p < b, p = NextPrime@ p]; If[p > b, p = 2; While[ MemberQ[s, p], p = NextPrime@ p]]; Append[s, p]];; Nest[ f, {2}, 50] (* and modified by Robert G. Wilson v, Feb 13 2017 *)

CROSSREFS

Cf. A007459. See A282027 for another version.

Sequence in context: A094318 A019344 A229291 * A068853 A236400 A288371

Adjacent sequences:  A057456 A057457 A057458 * A057460 A057461 A057462

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Sep 26 2000

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 11 12:05 EST 2017. Contains 295876 sequences.