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.

A060324 a(n) is the minimal prime q such that n*(q+1)-1 is prime, that is, the smallest prime q so that n = (p+1)/(q+1) with p prime; or a(n) = -1 if no such q exists.

Original entry on oeis.org

2, 2, 3, 2, 3, 2, 5, 2, 5, 2, 3, 3, 7, 2, 3, 2, 3, 2, 5, 2, 3, 5, 5, 2, 5, 3, 3, 2, 5, 2, 13, 3, 3, 2, 3, 2, 11, 2, 5, 5, 3, 3, 5, 2, 3, 2, 5, 3, 5, 2, 19, 5, 3, 7, 7, 2, 3, 2, 5, 2, 7, 11, 3, 2, 5, 2, 5, 3, 11, 5, 3, 5, 13, 5, 5, 2, 3, 2, 7, 2, 7, 5, 3, 2, 5, 2, 3, 2, 17, 2, 7, 3, 5, 2, 3, 3, 11, 2, 5, 5
Offset: 1

Views

Author

Matthew Conroy, Mar 29 2001

Keywords

Comments

A conjecture of Schinzel, if true, would imply that such a q always exists.

Examples

			1 = (2+1)/(2+1), so the first term is 2; 3(2+1) - 1 = 8 which is not prime, yet 3(3+1) - 1 = 11 is prime (3 = (11+1)/(3+1)) so the 3rd term is 3.
		

Crossrefs

Cf. A060424. Values of p are given in A062251.

Programs

  • Haskell
    a060324 n = head [q | q <- a000040_list, a010051' (n * (q + 1) - 1) == 1]
    -- Reinhard Zumkeller, Aug 28 2014
    
  • Maple
    a:= proc(n) local q;
           q:= 2;
           while not isprime(n*(q+1)-1) do
              q:= nextprime(q);
           od; q
        end:
    seq(a(n), n=1..300); # Alois P. Heinz, Feb 11 2011
  • Mathematica
    a[n_] := (q = 2; While[!PrimeQ[n*(q + 1) - 1], q = NextPrime[q]]; q); a /@ Range[100] (* Jean-François Alcover, Jul 20 2011, after Maple prog. *)
  • PARI
    a(n) = {my(q=2); while (!isprime(n*(q+1)-1), q = nextprime(q+1)); q;} \\ Michel Marcus, Nov 20 2017

Formula

a(n) = (A062251(n)+1) / n - 1. - Reinhard Zumkeller, Aug 28 2014

A249800 a(n) is the smallest prime q such that n(q+1)+1 is prime, that is, the smallest prime q such that n = (p-1)/(q+1) with p prime; or a(n) = -1 if no such q exists.

Original entry on oeis.org

3, 2, 3, 2, 5, 2, 3, 11, 3, 2, 5, 2, 3, 2, 3, 5, 5, 3, 11, 2, 5, 2, 5, 2, 3, 2, 3, 3, 7, 5, 11, 2, 5, 2, 5, 2, 3, 5, 3, 5, 17, 2, 3, 7, 3, 2, 5, 3, 3, 2, 5, 2, 13, 2, 5, 5, 3, 3, 11, 2, 5, 5, 5, 2, 7, 2, 3, 5, 3, 2, 7, 5, 3, 2, 7, 2, 5, 3, 3, 2, 5, 113, 5, 3, 11
Offset: 1

Views

Author

Paolo P. Lava, Nov 06 2014

Keywords

Comments

Variation on Schinzel's Hypothesis.

Examples

			For n=1 the minimum primes p and q are 5 and 3: (p-1)/(q+1) = (5-1)/(3+1) = 4/4 = 1. Therefore a(1)=3.
For n=2 the minimum primes p and q are 7 and 2: (p-1)/(q+1) = (7-1)/(2+1) = 6/3 = 2. Therefore a(2)=2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local k,n;
    for n from 1 to q do for k from 1 to q do
    if isprime(n*(ithprime(k)+1)+1) then print(ithprime(k)); break; fi;
    od; od; end: P(10^5);
  • Mathematica
    a249800[n_Integer] := Module[{q}, q = 2; While[CompositeQ[n (q + 1) + 1], q = NextPrime[q]]; q]; a249800/@Range[120] (* Michael De Vlieger, Nov 19 2014 *)
  • PARI
    a(n) = my(q=2); while(! isprime(n*(q+1)+1), q = nextprime(q+1)); q; \\ Michel Marcus, Nov 07 2014

A249801 Take smallest prime q such that n*(q+1)+1 is prime (A249800), that is, the smallest prime q so that n = (p-1)/(q+1) with p prime; sequence gives values of p; or -1 if A249800(n) = -1.

Original entry on oeis.org

5, 7, 13, 13, 31, 19, 29, 97, 37, 31, 67, 37, 53, 43, 61, 97, 103, 73, 229, 61, 127, 67, 139, 73, 101, 79, 109, 113, 233, 181, 373, 97, 199, 103, 211, 109, 149, 229, 157, 241, 739, 127, 173, 353, 181, 139, 283, 193, 197, 151, 307, 157, 743, 163, 331, 337, 229
Offset: 1

Views

Author

Paolo P. Lava, Nov 06 2014

Keywords

Comments

Variation on Schinzel's Hypothesis.

Examples

			For n=1 the minimum primes p and q are 5 and 3: (p-1)/(q+1) = (5-1)/(3+1) = 4/4 = 1. Therefore a(1)=5.
For n=2 the minimum primes p and q are 7 and 2: (p-1)/(q+1) = (7-1)/(2+1) = 6/3 = 2. Therefore a(2)=7. Etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local k,n;
    for n from 1 to q do for k from 1 to q do
    if isprime(n*(ithprime(k)+1)+1) then print(n*(ithprime(k)+1)+1);
    break; fi; od; od; end: P(10^5);
  • PARI
    a(n) = my(q=2); while(! isprime(p=n*(q+1)+1), q = nextprime(q+1)); p; \\ Michel Marcus, Nov 07 2014

A249802 a(n) is the smallest prime q such that n(q-1)-1 is prime, that is, the smallest prime q so that n = (p+1)/(q-1) with p prime; or a(n) = -1 if no such q exists.

Original entry on oeis.org

5, 3, 2, 2, 5, 2, 3, 2, 3, 3, 5, 2, 19, 2, 3, 3, 5, 2, 3, 2, 3, 3, 7, 2, 7, 5, 3, 7, 7, 2, 3, 2, 5, 3, 5, 3, 3, 2, 7, 3, 5, 2, 7, 2, 3, 19, 7, 2, 3, 5, 3, 3, 5, 2, 3, 5, 3, 7, 7, 2, 19, 2, 5, 3, 7, 3, 7, 2, 3, 3, 5, 2, 67, 2, 3, 3, 5, 5, 3, 2, 11, 3, 5, 2, 7, 11
Offset: 1

Views

Author

Paolo P. Lava, Nov 06 2014

Keywords

Comments

Variation on Schinzel's Hypothesis.

Examples

			For n=1 the minimum primes p and q are 3 and 5: (p+1)/(q-1) = (3+1)/(5-1) = 4/4 = 1. Therefore a(1)=5.
For n=2 the minimum primes p and q are 3 and 3: (p+1)/(q-1) = (3+1)/(3-1) = 4/2 = 2. Therefore a(2)=3. Etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local k,n;
    for n from 1 to q do for k from 1 to q do
    if isprime(n*(ithprime(k)-1)-1) then print(ithprime(k)); break; fi;
    od; od; end: P(10^5);
  • PARI
    a(n) = my(q=2); while(! isprime(n*(q-1)-1), q = nextprime(q+1)); q; \\ Michel Marcus, Nov 07 2014

A249803 Take smallest prime q such that n(q-1)-1 is prime (A249802), that is, the smallest prime q so that n = (p+1)/(q-1) with p prime; sequence gives values of p; or -1 if A249802(n) = -1.

Original entry on oeis.org

3, 3, 2, 3, 19, 5, 13, 7, 17, 19, 43, 11, 233, 13, 29, 31, 67, 17, 37, 19, 41, 43, 137, 23, 149, 103, 53, 167, 173, 29, 61, 31, 131, 67, 139, 71, 73, 37, 233, 79, 163, 41, 257, 43, 89, 827, 281, 47, 97, 199, 101, 103, 211, 53, 109, 223, 113, 347, 353, 59, 1097
Offset: 1

Views

Author

Paolo P. Lava, Nov 06 2014

Keywords

Comments

Variation on Schinzel's Hypothesis.

Examples

			For n=1 the minimum primes p and q are 3 and 5: (p+1)/(q-1) = (3+1)/(5-1) = 4/4 = 1. Therefore a(1)=3.
For n=2 the minimum primes p and q are 3 and 3: (p+1)/(q-1) = (3+1)/(3-1) = 4/2 = 2. Therefore a(2)=3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local k,n;
    for n from 1 to q do for k from 1 to q do
    if isprime(n*(ithprime(k)-1)-1) then print(n*(ithprime(k)-1)-1);
    break; fi; od; od; end: P(10^5);
  • PARI
    a(n) = my(q=2); while(! isprime(p=n*(q-1)-1), q = nextprime(q+1)); p; \\ Michel Marcus, Nov 07 2014

A062256 Record-setting values of q(n), the minimal prime q such that n(q+1)-1 is a prime p (i.e., q(n) > q(j) for all 0 < j < n).

Original entry on oeis.org

2, 11, 41, 103, 433, 1019, 2423, 6131, 22391, 146519, 398339, 1461359, 2803139, 3943883, 11329061, 37133051, 72486287, 89857919, 152222051, 247964153, 316352087, 927830951, 2030767073, 5359478723, 8908239161, 11980112897, 17219108579, 20740431791, 27651446429
Offset: 1

Views

Author

N. J. A. Sloane, Jul 01 2001

Keywords

Examples

			31 = (433+1)/(13+1).
		

Crossrefs

Cf. A060324, A062251. Values of n are in A060424, values of q in A062252.

Formula

a(n) = A060424(n)*(A062252(n)+1) - 1.

Extensions

More terms from Vladeta Jovovic, Jul 02 2001

A062252 Record-setting values of q(n), the minimal prime q such that n(q+1)-1 is a prime p (i.e., q(n) > q(j) for all 0 < j < n).

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 41, 71, 109, 179, 239, 269, 347, 353, 443, 503, 509, 617, 641, 701, 773, 881, 971, 977, 1013, 1019, 1103, 1109, 1223, 1559, 1607, 1709, 1889, 2063, 2297, 2663, 2963, 3137
Offset: 1

Views

Author

N. J. A. Sloane, Jul 01 2001

Keywords

Examples

			31 = (433+1)/(13+1).
		

Crossrefs

Cf. A060324, A062251. Values of n are in A060424, values of p in A062256.

Extensions

a(36)-a(39) from Amiram Eldar, Jan 26 2019
Showing 1-7 of 7 results.