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

A083772 Primes arising in A083771.

Original entry on oeis.org

3, 7, 31, 211, 2311, 43891, 1272811, 16546531, 976245271, 36121074991, 1119753324691, 52628406260431, 3526103219448811, 186883470630786931, 7662222295862264131, 743235562698639620611, 54256196077000692304531
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 06 2003

Keywords

Crossrefs

Programs

  • PARI
    { terms=20; a=A083771=vector(terms); A083771[1]=2; tmp=1; a[1]=3; for(k=2,terms, tmp=tmp*A083771[k-1]; p=1; while(1, until(isprime(p), p=p+2); for(m=1,k-1, if(p==A083771[m], break, if(m==k-1, if(isprime(tmp*p+1), A083771[k]=p; a[k]=tmp*p+1; print1(a[k],","); break(2))))))); a }

Extensions

More terms from Rick L. Shepherd, Mar 18 2004

A158076 Number of primality tests required to generate the n-th term of A083771.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 4, 1, 9, 4, 3, 5, 7, 5, 3, 10, 6, 13, 10, 3, 4, 30, 3, 14, 8, 6, 28, 6, 79, 3, 21, 12, 33, 22, 7, 7, 37, 12, 20, 31, 9, 9, 110, 62, 7, 38, 7, 7, 21, 5, 23, 6, 14, 20, 3, 14, 2, 86, 21, 12, 13, 32, 45, 85, 35, 27, 55, 95, 20, 6, 17, 131, 19, 12, 25, 55, 33, 25, 101, 11, 64
Offset: 0

Views

Author

Dmitry Kamenetsky, Mar 12 2009

Keywords

Comments

The numbers in this sequence are quite low, which suggests that A083771 can be generated quite easily/quickly. It would be interesting to generate further terms to see whether their slow growth continues.

Examples

			The first 5 terms of A083771 are the first 5 primes, so they all require a single primality test, hence the first 5 terms of this sequence are 1. For the 6th term in A083771 we must test 13, 17 until we finally find that 19 works, hence the 6th term of this sequence is 3.
		

Crossrefs

A039726 Recursive prime generating sequence.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 29, 37, 47, 67, 103, 179, 191, 223, 271, 293, 317, 577, 643, 673, 809, 863, 877, 1049, 1093, 1129, 1151, 1381, 1613, 1637, 2089, 2131, 2311, 2957, 3623, 3833, 4253, 4271, 4423, 4673, 5939, 7717, 8167, 9133, 9533, 9539, 9679, 11059, 11743, 11969, 14759, 15859, 15971, 16139, 17431, 17713, 17761, 19309, 19373, 20747, 20983, 23741, 25261, 25933
Offset: 1

Views

Author

Harvey Dubner (harvey(AT)dubner.com)

Keywords

References

  • H. Dubner, Recursive Prime Generating Sequences, Journal of Recreational Mathematics, 29(3) 170-175 1998 Baywood NY.

Crossrefs

For the primes so generated see A087864.
Cf. A083771.

Programs

  • Mathematica
    k = 1; cp = 2; ct = 1; n[ct] = 2; While[ct < 64, k++; p = Prime[k]; cp1 = cp*p; If[PrimeQ[cp1 + 1], cp = cp1; ct++; n[ct] = p]]; Table[n[k], {k, 1, ct}] (Lei Zhou)
    f[s_List] := Block[{p = Times @@ s, q = NextPrime@ s[[-1]]}, While[ !PrimeQ[p*q + 1], q = NextPrime@ q]; Append[s, q]]; Nest[f, {2}, 63] (* Robert G. Wilson v, Jul 20 2017 *)

Formula

2*3*5*7*...*a(n) +1 is prime. a(n) is prime. a(n) > a(n-1) with a(n) being the smallest possible prime.

Extensions

Corrected and extended by Ray Chandler, Nov 06 2003
Further terms from Lei Zhou, Dec 08 2005

A083769 a(1)=2; for n >= 2, a(n) = smallest even number such that a(1)*a(2)*...*a(n) + 1 is prime.

Original entry on oeis.org

2, 6, 8, 12, 16, 10, 4, 30, 26, 22, 24, 14, 50, 42, 18, 64, 46, 60, 32, 36, 20, 34, 28, 108, 48, 44, 68, 282, 90, 54, 76, 62, 180, 66, 132, 86, 74, 38, 58, 106, 120, 52, 244, 94, 100, 82, 138, 156, 98, 72, 172, 150, 248, 154, 166, 114, 162, 126, 124, 208, 222, 324, 212
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 06 2003

Keywords

Comments

Is this a permutation of the even numbers?
For any even positive integers a_1, a_2, ..., a_n, there are infinitely many even positive integers t such that a_1 a_2 ... a_n t + 1 is prime: this follows from Dirichlet's theorem on primes in arithmetic progressions. As far as I know there is no guarantee that the sequence defined here leads to a permutation of the even numbers, i.e. there might be some even integer that never appears in the sequence. However, if the partial products a_1 ... a_n grow like 2^n n!, heuristically the probability of a_1 ... a_n t + 1 being prime is on the order of 1/log(a_1 ... a_n) ~ 1/(n log n), and since sum_n 1/(n log n) diverges we might expect that there should be infinitely many n for which some a_1 ... a_n t + 1 is prime, and thus every even integer should occur. - Robert Israel, Dec 20 2012

Examples

			2+1=3, 2*6+1=13, 2*6*8+1=97, 2*6*8*12+1=1153, etc. are primes.
After 200 terms the prime is
224198929826405912196464851358435330956778558123234657623126\
069546460095464785674042966210907411841359152393200850271694\
899718487202330385432243578646330245831108247815285116235792\
875886417750289946171599027675234787802312202111702704952223\
563058999855839876391430601719636148884060097930252529666254\
756431522481046758186320659298713737639441014068272279177710\
551232067814381240340990584869121776471244800000000000000000\
00000000000000000000000000000 (449 digits). - _Robert Israel_, Dec 21 2012
		

Crossrefs

Programs

  • Maple
      N := 200: # number of terms desired
    P := 2:
    a[1] := 2:
    C := {seq(2*j, j = 2 .. 10)}:
    Cmax := 20:
    for n from 2 to N do
       for t in C do
          if isprime(t*P+1) then
            a[n]:= t;
            P:= t*P;
            C:= C minus {t};
            break;
          end if;
       end do;
       while not assigned(a[n]) do
         t0:= Cmax+2;
         Cmax:= 2*Cmax;
         C:= C union {seq(j, j=t0 .. Cmax, 2)};
         for t from t0 to Cmax by 2 do
           if isprime(t*P+1) then
             a[n]:= t;
             P:= t*P;
             C:= C minus {t};
             break;
           end if
         end do;
       end do;
    end do;
    [seq(a[n],n=1..N)];
  • Mathematica
    f[s_List] := Block[{k = 2, p = Times @@ s}, While[ MemberQ[s, k] || !PrimeQ[k*p + 1], k += 2]; Append[s, k]]; Nest[f, {2}, 62] (* Robert G. Wilson v, Dec 24 2012 *)

Extensions

More terms from David Wasserman, Nov 23 2004
Edited by N. J. A. Sloane, Dec 20 2012
Comment edited, Maple code and additional terms by Robert Israel, Dec 20 2012

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

Original entry on oeis.org

2, 3, 5, 19, 11, 7, 31, 23, 193, 67, 367, 131, 317, 1097, 241, 1777, 773, 2819, 2689, 1381, 1741, 3389, 631, 8581, 41, 1553, 2297, 1427, 17053, 1493, 883, 619, 9803, 13331, 26203, 37, 7681, 41269, 1913, 27091, 3079, 31583, 5867, 22409, 13367, 37337, 29573, 6469
Offset: 1

Views

Author

Amiram Eldar, Jan 19 2023

Keywords

Examples

			2 - 1 = 1 and 2 + 1 = 3 are both noncomposite numbers.
2*3 - 1 = 5 and 2*3 + 1 = 7 are both noncomposite numbers.
2*3*5 - 1 = 29 and 2*3*5 + 1 = 31 are both noncomposite numbers.
		

Crossrefs

Programs

  • Maple
    P:= {seq(ithprime(i),i=2..10^5)}:
    R:= 2: s:= 2:
    for i from 2 to 100 do
      found:= false;
      for p in P do
        if isprime(p*s-1) and isprime(p*s+1) then R:= R,p; s:= p*s; P:= P minus {p}; found:= true; break fi;
      od;
      if not found then break fi
    od:
    R; # Robert Israel, Jan 19 2023
  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{t = Table[a[k], {k, 1, n - 1}], p = 2, r}, r = Times @@ t; While[MemberQ[t, p] || ! PrimeQ[r*p - 1] || ! PrimeQ[r*p + 1], p = NextPrime[p]]; p]; Array[a, 50]

A093442 a(n) = (A093441(n+1)-1)/(A093441(n)-1).

Original entry on oeis.org

3, 5, 7, 11, 19, 29, 13, 59, 37, 31, 47, 67, 53, 41, 97, 73, 113, 103, 43, 71, 233, 61, 151, 109, 101, 251, 107, 587, 79, 223, 167, 311, 239, 137, 139, 359, 181, 257, 337, 163, 173, 881, 563, 149, 409, 157, 179, 293, 127, 331, 191, 269, 317, 83, 277, 23, 821, 373, 271
Offset: 1

Views

Author

Amarnath Murthy, Apr 01 2004

Keywords

Crossrefs

Cf. A093441.
Cf. A083771. - R. J. Mathar, Sep 05 2008

Programs

  • Mathematica
    a[1] = 3; a[n_] := a[n] = Block[{k = m = a[n - 1] - 1}, k *= 2; While[ ! PrimeQ[k + 1] || ! SquareFreeQ[k], k += m]; k + 1]; Table[(a[n + 1] - 1)/(a[n] - 1), {n, 60}] (* Stefan Steinerberger, Apr 03 2006 *)

Extensions

More terms from Stefan Steinerberger, Apr 03 2006

A290427 Rearrangement of primes such that every partial product minus 1 is a prime.

Original entry on oeis.org

3, 2, 5, 13, 7, 11, 19, 43, 79, 31, 17, 71, 89, 23, 41, 67, 29, 73, 83, 107, 59, 53, 239, 101, 109, 233, 61, 197, 97, 103, 37, 211, 113, 157, 167, 131, 181, 179, 269, 127, 421, 47, 523, 173, 331, 307, 149, 347, 257, 199, 277, 139, 151, 433, 223, 449, 227, 313, 647, 443, 283, 929, 509
Offset: 1

Views

Author

Robert G. Wilson v, Jul 31 2017

Keywords

Comments

Records: 3, 5, 13, 19, 43, 79, 89, 107, 239, 269, 421, 523, 647, 929, 1069, 1321, 1783, 1879, 2347, 4217, 4801, 7001, 7691, 9623, 22769, 23011, 27541, 29009, ..., .
Position of the n_th prime: 2, 1, 3, 5, 6, 4, 11, 7, 14, 17, 10, 31, 15, 8, 42, 22, 21, 27, 16, 12, 18, 9, ..., .
Prime index of a(n): 2, 1, 3, 6, 4, 5, 8, 14, 22, 11, 7, 20, 24, 9, 13, 19, 10, 21, 23, 28, 17, 16, 52, 26, 29, 51, ..., .

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{p = Times @@ s, q = 2}, While[ MemberQ[s, q] || !PrimeQ[p*q - 1], q = NextPrime@ q]; Append[s, q]]; Nest[f, {3}, 40]

Formula

3*2*5*...*a(n) -1 is prime. a(n) is the least prime not previously in the sequence.
Showing 1-7 of 7 results.