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!)
A083275 a(n) = smallest number not occurring earlier such that a(1)*a(2)*...*a(n) - 1 is prime. 3
3, 1, 2, 4, 7, 5, 6, 11, 12, 10, 13, 17, 14, 16, 15, 8, 18, 23, 21, 26, 22, 27, 41, 30, 20, 57, 32, 29, 24, 65, 42, 38, 28, 63, 35, 19, 58, 31, 36, 61, 45, 37, 33, 69, 53, 67, 127, 40, 95, 25, 86, 48, 39, 72, 70, 79, 54, 74, 91, 125, 85, 94, 46, 9, 80, 60, 119, 167, 139, 90, 49 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Alois P. Heinz and Giovanni Resta, Table of n, a(n) for n = 1..1200 (first 300 terms from Alois P. Heinz)
MAPLE
b:= proc() false end:
m:= proc(n) option remember; a(n)*m(n-1) end: m(0):=1:
a:= proc(n) option remember; local k; for k while b(k)
or not isprime(k*m(n-1)-1) do od; b(k):=true; k
end:
seq(a(n), n=1..80); # Alois P. Heinz, Jun 17 2015
MATHEMATICA
p=1; L={}; Do[k=1; While[ MemberQ[L, k] || !PrimeQ[p*k - 1], k++]; p *= k; AppendTo[L, k], {30}]; L (* Giovanni Resta, Jun 23 2015 *)
PROG
(PARI) v=[3]; n=1; while(n<100, s=-1+n*prod(i=1, #v, v[i]); if(isprime(s)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v \\ Derek Orr, Jun 16 2015
CROSSREFS
Sequence in context: A104695 A233904 A292576 * A230892 A325671 A138382
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Jun 01 2003
EXTENSIONS
Name corrected by Derek Orr, Jun 16 2015
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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)