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

A087864 Primes generated from A039726.

Original entry on oeis.org

3, 7, 31, 211, 2311, 43891, 1272811, 47093971, 2213416591, 148298911531, 15274787887591, 2734187031878611, 522229723088814511, 116457228248805635731, 31559908855426327282831, 9247053294639913893869191, 2931315894400852704356533231, 1691369271069292010413719673711
Offset: 1

Views

Author

Lekraj Beedassy, Oct 10 2003

Keywords

References

  • Harvey Dubner, Recursive Prime Generating Sequences, Journal of Recreational Mathematics, Vol. 29, No. 3 (1998), pp. 170-175, see p. 172, Table 2.

Crossrefs

Cf. A039726.

Programs

  • Mathematica
    k = 1; cp = 2; ct = 1; n[ct] = 3; While[ct < 20, k++; p = Prime[k]; cp1 = cp*p; If[PrimeQ[cp1 + 1], cp = cp1; ct++; n[ct] = cp + 1]]; Table[n[k], {k, 1, ct}] (* Lei Zhou *)

Extensions

More terms from Ray Chandler, Nov 06 2003

A083771 Rearrangement of primes such that every partial product + 1 is a prime.

Original entry on oeis.org

2, 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, 283, 461, 569, 853, 487, 433, 647, 953, 383, 199, 367, 1231, 397, 307, 457, 691, 523, 463, 1061, 281, 787, 421, 197, 857, 1103, 347, 631, 499, 991, 643, 769, 983, 607, 811, 449, 1223, 733, 1327, 683, 1021
Offset: 1

Views

Author

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

Keywords

Comments

Though initial terms match it is different from A039726, in that a smaller prime may appear later.
Some of the larger entries may only correspond to probable primes.
A158076 suggests that the numbers in this sequence can be generated quite easily/quickly. Perhaps this sequence is a fast method to generate large probable primes. [Dmitry Kamenetsky, Mar 12 2009]
Records: 2, 3, 5, 7, 11, 19, 29, 59, 67, 97, 113, 233, 251, 587, 881, 953, 1231, 1327, 1553, 1657, 2383, 3251, 3769, 6737, 6947, 7103, 7879, 8263, 10159, 11369, 22003, ..., . - Robert G. Wilson v, Jul 20 2017
Position of the n_th prime: 1, 2, 3, 4, 5, 8, 472, 6, 57, 7, 11, 10, 15, 20, 12, 14, 9, 23, 13, 21, 17, 30, 55, 478, 16, 26, 19, 28, 25, 18, 50, 345, 35, 36, 45, 24, ..., . - Robert G. Wilson v, Jul 20 2017

Examples

			The n-th term is the smallest prime that is not already in the sequence, such that one plus the product of the first n terms is prime. [_Dmitry Kamenetsky_, Mar 12 2009]
		

Crossrefs

Cf. number of primality tests required for each term in this sequence is in A158076. [Dmitry Kamenetsky, Mar 12 2009]

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, {2}, 63] (* Robert G. Wilson v, Jul 20 2017 *)
  • PARI
    { terms=100; a=A083772=vector(terms); a[1]=2; tmp=1; A083772[1]=3; for(k=2,terms, tmp=tmp*a[k-1]; p=1; while(1, until(isprime(p), p=p+2); for(m=1,k-1, if(p==a[m], break, if(m==k-1, if(isprime(tmp*p+1), a[k]=p; A083772[k]=tmp*p+1; print1(a[k],","); break(2))))))); a }

Extensions

More terms from Rick L. Shepherd, Mar 18 2004

A087898 Choose a(n) so that 2*3*5*13*...*a(n) - 1 is prime; a(n) is prime; and a(n) > a(n-1).

Original entry on oeis.org

2, 3, 5, 13, 23, 37, 53, 67, 79, 157, 173, 191, 197, 277, 281, 461, 479, 503, 619, 829, 907, 997, 1033, 1303, 1459, 1493, 1663, 2357, 2467, 3331, 3347, 3407, 4093, 4441, 4591, 4987, 5179, 5189, 6911, 8807, 9227, 9739, 10243, 10559, 11093, 11549, 11617
Offset: 1

Views

Author

Lekraj Beedassy, Oct 14 2003

Keywords

Comments

Recursive prime generating sequence.

References

  • Harvey Dubner, Recursive Prime Generating Sequences, Journal of Recreational Mathematics, Vol. 29, No. 3 (1998), pp. 170-175, see p. 173, Table 3.

Crossrefs

For the primes so generated see A087899.
Cf. A039726.

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{r = Product[a[k], {k, 1, n - 1}], p = NextPrime[a[n - 1]]}, While[! PrimeQ[r*p - 1], p = NextPrime[p]]; p]; Array[a, 50] (* Amiram Eldar, Jan 19 2023 *)

Extensions

More terms from Ray Chandler, Nov 06 2003

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

A236465 Smallest prime a(n) such that 1 + a(1)*a(2)*...*a(n) is prime.

Original entry on oeis.org

2, 2, 3, 3, 2, 13, 2, 11, 19, 2, 2, 5, 11, 2, 31, 53, 3, 31, 43, 19, 13, 11, 43, 23, 7, 5, 13, 5, 29, 2, 29, 17, 53, 157, 13, 13, 3, 5, 127, 7, 97, 5, 97, 2, 89, 61, 7, 71, 61, 5, 127, 113, 37, 191, 107, 17, 197, 37, 101, 2, 5, 7, 17, 457, 3, 19, 29, 103, 227
Offset: 1

Views

Author

Thomas Ordowski, Jan 26 2014

Keywords

Examples

			a(1) = 2 because 1 + 2 = 3, which is prime.
a(2) = 2 because 1 + 2 * 2 = 5, which is prime.
a(3) = 3 because 2 doesn't work, since 1 + 2 * 2 * 2 = 9 = 3^2, but 3 does work, giving 1 + 2 * 2 * 3 = 13, which is prime.
		

Crossrefs

Programs

  • Mathematica
    pr = 1; Table[p = 2; While[! PrimeQ[p * pr + 1], p = NextPrime@p]; pr *= p; p, {n, 100}] (* Giovanni Resta, Jan 26 2014 *)

Extensions

a(11)-a(69) from Giovanni Resta, Jan 26 2014

A359939 Lexicographically earliest strictly increasing sequence of primes whose partial products lie between noncomposite numbers.

Original entry on oeis.org

2, 3, 5, 19, 41, 67, 113, 653, 883, 1439, 3823, 10631, 12841, 14251, 23357, 27103, 30491, 64679, 78823, 110977, 115127, 118747, 159431, 215587, 301039, 342257, 343639, 428401, 473383, 493583, 566723, 621133, 638371, 639157, 680539, 904049, 993037, 1146133, 1252507
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

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{r = Product[a[k],{k, 1, n-1}], p = NextPrime[a[n-1]]}, While[!PrimeQ[r*p-1] || !PrimeQ[r*p+1], p = NextPrime[p]]; p]; Array[a, 50]

A082603 a(n) is the first prime greater than a(n-1) such that a(n)*a(n-1)+2 is a prime, with a(1)=3.

Original entry on oeis.org

3, 5, 7, 11, 19, 23, 37, 47, 73, 227, 241, 251, 271, 317, 367, 563, 607, 641, 727, 761, 829, 1091, 1117, 1223, 1249, 1451, 1579, 1601, 1627, 1721, 1741, 1787, 1873, 1877, 1933, 1973, 2017, 2087, 2137, 2153, 2287, 2351, 2521, 2687, 2707, 2741, 2851, 3041, 3121, 3137, 3181, 3191, 3361, 3371, 3457, 3461, 3541, 3557, 3607, 3701, 3877, 3881, 3907, 3947
Offset: 1

Views

Author

Jon Perry, May 23 2003

Keywords

Examples

			a(3)=7, as 3 + 2 = 5, 3*5 + 2 = 17, 5*7 + 2 = 37, etc.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{p = pp = s[[-1]]}, While[p = NextPrime@p; !PrimeQ[ p*pp + 2],]; Append[s, p]]; Nest[f, {3}, 63] (* Robert G. Wilson v, Nov 08 2010 *)
    fpg[p1_]:=Module[{p2=NextPrime[p1]},While[!PrimeQ[p1 p2+2],p2=NextPrime[ p2]];p2]; NestList[fpg,3,70] (* Harvey P. Dale, May 31 2021 *)
  • PARI
    { vp=vector(20); vp[1]=3; vc=1; vpt=3; print1(3","); for (vc=2,20, forprime (p=vp[vc-1]+1,10000, if (isprime(p*vp[vc-1]+2),vp[vc]=p;vpt*=p; print1(vp[vc]","); break))) }
    
  • PARI
    {v=3;print1(3",");forprime(p=5,10000,vp=v*p;if(isprime(vp+2),v=vp;print1(p",")))} \\ Zak Seidov, Nov 07 2010

Extensions

Definition and example corrected to match the sequence and PARI programming, two cross references added, and sequence extended by Robert G. Wilson v, Nov 08 2010

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

Showing 1-8 of 8 results.