cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

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.

Original entry on oeis.org

2, 3, 5, 7, 13, 11, 17, 19, 23, 37, 73, 29, 31, 43, 79, 53, 83, 67, 41, 47, 179, 149, 181, 103, 71, 59, 197, 167, 109, 137, 107, 251, 101, 157, 199, 283, 211, 277, 173, 127, 269, 61, 89, 271, 151, 191, 227, 311, 409, 577, 331, 281, 313, 307, 223, 491, 439, 233, 367
Offset: 1

Views

Author

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

Keywords

Comments

The terms are easily seen to be distinct. It is conjectured that every element is prime. Do all primes occur in the sequence?
All elements are prime and distinct through n=1000. - Robert Price, Mar 09 2013
All elements are prime and distinct through n=3724. - Dana Jacobsen, Feb 15 2015
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
A generalization of Fortunate's conjecture, cf. A005235. - M. F. Hasler, Nov 04 2024
Conjecture: there are infinitely many values of this sequence such that a(n) < n. - Davide Rotondo, Feb 28 2025

Crossrefs

Cf. A062894 has the indices of the primes in this sequence. A071290 has the sequence of f's. Also see A067362, A068192.
Cf. A005235 (Fortunate numbers).

Programs

  • Mathematica
    <Jayanta Basu, Aug 10 2013 *)
  • MuPAD
    f := 1:for n from 1 to 50 do a := nextprime(f+2)-f:f := f*a:print(a) end_for
    
  • 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
    
  • Python
    from sympy import nextprime
    def A067836_gen(): # generator of terms
        a, f = 2, 1
        yield 2
        while True:
            yield (a:=nextprime((f:=f*a)+1)-f)
    A067836_list = list(islice(A067836_gen(),30)) # Chai Wah Wu, Sep 09 2023

Extensions

Edited by Dean Hickerson, Mar 02 2002
Edited by Dean Hickerson and David W. Wilson, Jun 10 2002

A067363 a(n)=p-n!^3, where p is the smallest prime > n!^3+1.

Original entry on oeis.org

2, 3, 7, 5, 17, 11, 17, 23, 23, 103, 59, 17, 29, 79, 59, 23, 347, 307, 53, 227, 131, 83, 67, 223, 29, 59, 197, 83, 181, 293, 71, 71, 139, 43, 67, 103, 431, 743, 1279, 197, 419, 127, 271, 73, 229, 503, 211, 181, 1597, 151, 151, 197, 1013, 179, 587, 71, 137, 547
Offset: 1

Views

Author

Frank Buss (fb(AT)frank-buss.de), Jan 19 2002

Keywords

Comments

The first 118 terms are primes. Are all terms prime? For n!^i, with 0
The first 2278 terms are primes. - Dana Jacobsen, May 13 2015

Programs

  • Mathematica
    a[n_] := For[i=2, True, i++, If[PrimeQ[n!^3+i], Return[i]]]
    spn[n_]:=Module[{c=(n!)^3},NextPrime[c+1]-c]; Array[spn,60] (* Harvey P. Dale, May 25 2023 *)
  • MuPAD
    for n from 1 to 50 do f := n!^3:a := nextprime(f+2)-f:print(a) end_for
    
  • PARI
    for(n=1, 100, f=n!^3; print1(nextprime(f+2)-f,", ")) \\ Dana Jacobsen, May 13 2015
    
  • Perl
    use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**3; say "$n ", next_prime($f+1)-$f; } # Dana Jacobsen, May 13 2015

Extensions

Edited by Dean Hickerson, Mar 02 2002

A067364 a(n)=p-n!^4, where p is the smallest prime > n!^4+1.

Original entry on oeis.org

2, 3, 5, 5, 7, 29, 19, 29, 181, 19, 31, 173, 79, 43, 379, 61, 101, 127, 101, 83, 37, 29, 271, 233, 109, 233, 293, 1039, 137, 241, 173, 197, 613, 1933, 277, 71, 503, 449, 1667, 53, 67, 163, 179, 211, 53, 613, 1171, 1069, 359, 199, 839, 433, 1523, 463, 677
Offset: 1

Author

Frank Buss (fb(AT)frank-buss.de), Jan 19 2002

Keywords

Comments

The first 102 terms are primes. Are all terms prime? For n!^i, with 0
The first 1865 terms are primes. - Dana Jacobsen, May 13 2015

Programs

  • Mathematica
    a[n_] := For[i=2, True, i++, If[PrimeQ[n!^4+i], Return[i]]]
  • MuPAD
    for n from 1 to 50 do f := n!^4:a := nextprime(f+2)-f:print(a) end_for
    
  • PARI
    for(n=1, 500, f=n!^4; print1(nextprime(f+2)-f, ", ")) \\ Dana Jacobsen, May 13 2015
    
  • Perl
    use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**4; say "$n ", next_prime($f+1)-$f; } # Dana Jacobsen, May 13 2015

Extensions

Edited by Dean Hickerson, Mar 02 2002

A067365 a(n) = p-n!^5, where p is the smallest prime > n!^5+1.

Original entry on oeis.org

2, 5, 13, 13, 7, 7, 11, 71, 23, 19, 197, 17, 101, 53, 17, 47, 73, 97, 53, 433, 251, 251, 47, 263, 281, 353, 53, 61, 179, 41, 53, 401, 449, 79, 89, 1283, 367, 2011, 139, 227, 1597, 1657, 1123, 397, 131, 727, 137, 167, 89, 379, 421, 653, 223, 373, 2221, 1447
Offset: 1

Author

Frank Buss (fb(AT)frank-buss.de), Jan 19 2002

Keywords

Comments

The first 60 terms are primes. Are all terms prime? For n!^i, with 0
The first 1592 terms are primes. - Dana Jacobsen, May 13 2015

Programs

  • Mathematica
    a[n_] := For[i=2, True, i++, If[PrimeQ[n!^5+i], Return[i]]]
    spf[n_]:=Module[{c=(n!)^5},NextPrime[c+1]-c]; Array[spf,60] (* Harvey P. Dale, Feb 24 2015 *)
  • MuPAD
    for n from 1 to 50 do f := n!^5:a := nextprime(f+2)-f:print(a) end_for
    
  • PARI
    for(n=1, 100, f=n!^5; print1(nextprime(f+2)-f, ", ")) \\ Dana Jacobsen, May 13 2015
    
  • Perl
    use ntheory ":all"; use Math::GMP qw/:constant/; for my $n (1..500) { my $f=factorial($n)**5; say "$n ", next_prime($f+1)-$f; } # Dana Jacobsen, May 13 2015

Extensions

Edited by Dean Hickerson, Mar 02 2002

A066889 a(n) = g(P(n)+2) - P(n), where P(n) = Product_{k=1..n} Fibonacci(k) and g(i) is the smallest prime >= i.

Original entry on oeis.org

2, 2, 3, 5, 7, 11, 17, 17, 37, 23, 47, 37, 29, 19, 47, 59, 19, 37, 71, 59, 31, 67, 239, 101, 739, 409, 43, 367, 167, 251, 73, 71, 419, 1567, 107, 83, 223, 191, 227, 449, 97, 173, 103, 523, 79, 137, 223, 1163, 661, 103, 103, 541, 227, 2383, 433, 71
Offset: 1

Author

Frank Buss (fb(AT)frank-buss.de), Jan 22 2002

Keywords

Comments

The first 169 terms are primes. Are all terms primes? See links for similar sequences.
Note that g is not the usual "nextprime" function. If the usual nextprime function is used, we get A286296.

Examples

			a(4) = 5 because Fibonacci(1)*Fibonacci(2)*Fibonacci(3)*Fibonacci(4) = 1*1*2*3 = 6, g(6+2) = 11, and 11 - 6 = 5.
		

Crossrefs

Cf. A000045, A067362, A286296 (the same except for the first two terms).

Programs

  • Mathematica
    Join[{2,2},Drop[NextPrime[#+2]-#&/@FoldList[Times,Fibonacci[ Range[ 60]]],2]] (* Harvey P. Dale, May 31 2017 *)
  • MuPAD
    f := 1:for n from 1 to 100 do f := f*numlib::fibonacci(n):a := nextprime(f+2)-f:print(a) end_for
  • PARI
    { m=1; for (n=1, 1000, m*=fibonacci(n); write("b066889.txt", n, " ", nextprime(m+2) - m) ) } \\ Harry J. Smith, Apr 05 2010
    

Extensions

Definition and example corrected by Harvey P. Dale and N. J. A. Sloane, May 31 2017
Showing 1-5 of 5 results.