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!)
A067836 Let a(1)=2, f(n)=a(1)*a(2)*...*a(n-1) for n>=1 and a(n)=nextprime(f(n)+1)-f(n) for n>=2, where nextprime(x) is the smallest prime > x. 10

%I #41 Sep 09 2023 16:02:47

%S 2,3,5,7,13,11,17,19,23,37,73,29,31,43,79,53,83,67,41,47,179,149,181,

%T 103,71,59,197,167,109,137,107,251,101,157,199,283,211,277,173,127,

%U 269,61,89,271,151,191,227,311,409,577,331,281,313,307,223,491,439,233,367

%N Let a(1)=2, f(n)=a(1)*a(2)*...*a(n-1) for n>=1 and a(n)=nextprime(f(n)+1)-f(n) for n>=2, where nextprime(x) is the smallest prime > x.

%C The terms are easily seen to be distinct. It is conjectured that every element is prime. Do all primes occur in the sequence?

%C All elements are prime and distinct through n=1000. - _Robert Price_, Mar 09 2013

%C All elements are prime and distinct through n=3724. - _Dana Jacobsen_, Feb 15 2015

%C With a(0) = 1, a(n) is the next smallest number not in the sequence such that a(n) + Product_{i=1..n-1} a(i) is prime. - _Derek Orr_, Jun 16 2015

%H Robert Price and Dana Jacobsen, <a href="/A067836/b067836.txt">Table of n, a(n) for n = 1..3724</a> (first 1000 terms from Robert Price)

%H Frank Buss, <a href="http://www.primepuzzles.net/conjectures/conj_028.htm">Prime Puzzles - Frank Buss's Conjecture</a>

%H Frank Buss, <a href="http://www.primepuzzles.net/conjectures/conj_029.htm">The B(n) function</a>

%t <<NumberTheory`PrimeQ` (* Load ProvablePrimeQ function, needed below. *)

%t f[1]=1; f[n_] := f[n]=f[n-1]a[n-1]; a[n_] := a[n]=Module[{i}, For[i=2, True, i++, If[ProvablePrimeQ[f[n]+i], Return[i]]]]

%t Join[{a = 2}, f = 1; Table[f = f*a; a = NextPrime[f + 1] - f; a, {n, 2, 59}]] (* _Jayanta Basu_, Aug 10 2013 *)

%o (MuPAD) f := 1:for n from 1 to 50 do a := nextprime(f+2)-f:f := f*a:print(a) end_for

%o (PARI) v=[2];n=2;while(n<500,s=n+prod(i=1,#v,v[i]);if(isprime(s)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=1);n++);v \\ _Derek Orr_, Jun 16 2015

%o (Python)

%o from sympy import nextprime

%o def A067836_gen(): # generator of terms

%o a, f = 2, 1

%o yield 2

%o while True:

%o yield (a:=nextprime((f:=f*a)+1)-f)

%o A067836_list = list(islice(A067836_gen(),30)) # _Chai Wah Wu_, Sep 09 2023

%Y Cf. A062894 has the indices of the primes in this sequence. A071290 has the sequence of f's. Also see A067362, A068192.

%K nonn

%O 1,1

%A Frank Buss (fb(AT)frank-buss.de), Feb 09 2002

%E Edited by _Dean Hickerson_, Mar 02 2002

%E Edited by _Dean Hickerson_ and _David W. Wilson_, Jun 10 2002

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)