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-3 of 3 results.

A087900 2*3*5*6*...*a(n) -+ 1 are primes, with a(n+1) > a(n).

Original entry on oeis.org

2, 3, 5, 6, 9, 13, 22, 24, 51, 92, 120, 176, 258, 274, 375, 663, 713, 760, 911, 1002, 1155, 1356, 1455, 1502, 1628, 1701, 1867, 2630, 3212, 4858, 4892, 6282, 7507, 8214, 8897, 9348, 9876, 11287, 13296, 14299, 15964, 17642, 18303, 18599, 22310, 23495, 24101, 25513
Offset: 1

Views

Author

Lekraj Beedassy, Oct 14 2003

Keywords

Comments

Recursive twin-prime generating sequence.
For the twin primes so generated see A087901.

References

  • H. Dubner, "Recursive Prime Generating Sequences", Table 6 pp. 175 Journal of Recreational Mathematics 29(3)1998 Baywood NY.

Crossrefs

Programs

  • Maple
    R:= 2; s:= 2: count:= 1:
    for r from 3 while count < 100 do
        if isprime(s*r+1) and isprime(s*r-1) then
          count:= count+1; R:= R,r; s:= s*r;
        fi;
    od:
    R; # Robert Israel, Jun 11 2025

A359948 Lexicographically earliest sequence of primes whose partial products lie between noncomposite numbers.

Original entry on oeis.org

2, 2, 3, 5, 3, 13, 5, 7, 41, 13, 83, 109, 347, 337, 127, 67, 379, 499, 739, 4243, 2311, 1973, 5827, 7333, 971, 3449, 3967, 3407, 12671, 1423, 859, 20641, 7237, 769, 9209, 281, 12919, 16633, 11383, 30449, 6733, 40627, 34591, 1103, 14303, 5479, 4603, 17477, 5113, 51001, 36299, 57037, 1153, 34297, 1237
Offset: 1

Views

Author

Robert Israel, Jan 19 2023

Keywords

Comments

Are there any repeated terms other than a(1) = a(2) = 2, a(3) = a(5) = 3, a(4) = a(7) = 5 and a(6) = a(10) = 13?

Examples

			2 - 1 = 1 and 2 + 1 = 3 are both noncomposites.
2*2 - 1 = 3 and 2*2 + 1 = 5 are both primes.
2*2*3 - 1 = 11 and 2*2*3 + 1 = 13 are both primes.
2*2*3*5 - 1 = 59 and 2*2*3*5 + 1 = 61 are both primes.
		

Crossrefs

Programs

  • Maple
    R:= 2: s:= 2:
    for i from 2 to 60 do
      p:= 1:
      do
        p:= nextprime(p);
      if isprime(p*s-1) and isprime(p*s+1) then R:= R,p; s:= p*s; break fi;
    od od:
    R;
  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{r = Product[a[k], {k, 1, n - 1}], p = 2}, While[! PrimeQ[r*p - 1] || ! PrimeQ[r*p + 1], p = NextPrime[p]]; p]; Array[a, 55] (* Amiram Eldar, Jan 19 2023 *)
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        s = 2; yield 2
        while True:
            p = 2
            while True:
                if isprime(s*p-1) and isprime(s*p+1):
                    yield p; s *= p; break
                p = nextprime(p)
    print(list(islice(agen(), 55))) # Michael S. Branicky, Jan 19 2023

A363274 a(n) is the smallest prime such that a(1)*a(2)*...*a(n) +/- 1 is prime.

Original entry on oeis.org

2, 2, 2, 2, 2, 3, 2, 2, 2, 11, 3, 3, 2, 2, 5, 2, 2, 3, 3, 5, 2, 2, 5, 2, 2, 7, 3, 3, 2, 2, 23, 47, 2, 2, 2, 29, 2, 53, 13, 5, 17, 29, 5, 3, 3, 3, 5, 17, 2, 3, 3, 79, 31, 11, 7, 23, 2, 7, 3, 7, 2, 13, 5, 7, 5, 7, 23, 17, 23, 13, 31, 29, 7, 67, 47, 7, 2, 23, 13, 23, 23, 31, 73, 13, 23, 3, 17
Offset: 1

Views

Author

Dmitry Kamenetsky, Jul 08 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{r = Product[a[k], {k, 1, n - 1}], p = 2}, While[! PrimeQ[r*p - 1] && ! PrimeQ[r*p + 1], p = NextPrime[p]]; p]; Array[a, 100] (* Amiram Eldar, Jul 08 2023 *)
Showing 1-3 of 3 results.