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

A062251 Take minimal prime q such that n(q+1)-1 is prime (A060324), that is, the smallest prime q so that n = (p+1)/(q+1) with p prime; sequence gives values of p.

Original entry on oeis.org

2, 5, 11, 11, 19, 17, 41, 23, 53, 29, 43, 47, 103, 41, 59, 47, 67, 53, 113, 59, 83, 131, 137, 71, 149, 103, 107, 83, 173, 89, 433, 127, 131, 101, 139, 107, 443, 113, 233, 239, 163, 167, 257, 131, 179, 137, 281, 191, 293, 149, 1019, 311, 211, 431, 439, 167, 227
Offset: 1

Views

Author

N. J. A. Sloane, Jul 01 2001

Keywords

Comments

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

Examples

			1 = (2+1)/(2+1), 2 = (5+1)/(2+1), 3 = (11+1)/(3+1), 4 = (11+1)/(2+1), ...
		

Crossrefs

Cf. A060424. Values of q are given in A060324.

Programs

  • Haskell
    a062251 n = (a060324 n + 1) * n - 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; n*(q+1)-1
        end:
    seq(a(n), n=1..300);
  • Mathematica
    a[n_] := (q = 2; While[ ! PrimeQ[n*(q+1)-1], q = NextPrime[q]]; n*(q+1)-1); Table[a[n], {n, 1, 57}] (* Jean-François Alcover, Feb 17 2012, after Maple *)

Formula

a(n) = (A060324(n) + 1) * n - 1. - Reinhard Zumkeller, Aug 28 2014

Extensions

More terms from Vladeta Jovovic, Jul 02 2001

A078454 Index of the first occurrence of prime(n) in A060324.

Original entry on oeis.org

1, 3, 7, 13, 37, 31, 89, 51, 101, 219, 309, 973, 146, 832, 464, 1031, 2714, 2352, 6403, 311, 6397, 6352, 1487, 1439, 20718, 4252, 11958, 3719, 1332, 4136, 14509, 4601, 4223, 12414, 4043, 38862, 57949, 20257, 4958, 4832, 2213, 96792, 27932, 261337
Offset: 1

Views

Author

Amarnath Murthy, Dec 23 2002

Keywords

Comments

Smallest k such that k*prime(n) + k - 1 is a prime.

Crossrefs

Cf. A060324.

Programs

  • PARI
    A060324(n)=forprime(q=2,999999999,if(isprime(n*(q+1)-1),return(q)));-1
    al(n)=local(v,k,xv);v=vector(n);while(n>0,xv=primepi(A060324(k++));if(xv<=#v&v[xv]==0,v[xv]=k;n--));v (End)

Extensions

More terms from Franklin T. Adams-Watters, May 25 2010

A060424 Record-setting n's for the function q(n), the minimum prime q such that n(q+1)-1 is prime p (i.e., q(n) > q(j) for all 0 < j < n).

Original entry on oeis.org

1, 3, 7, 13, 31, 51, 101, 146, 311, 1332, 2213, 6089, 10382, 11333, 32003, 83633, 143822, 176192, 246314, 386237, 450644, 1198748, 2302457, 5513867, 9108629, 11814707, 16881479, 18786623, 24911213, 28836722, 34257764, 196457309
Offset: 1

Views

Author

Matthew Conroy, Apr 10 2001

Keywords

Examples

			a(3)=7, since q(7)=5 and q(j) < 5 for 0 < j < 7.
		

Crossrefs

Cf. A060324. See A062252 and A062256 for the corresponding values of q and p.

Programs

  • Mathematica
    q[n_] := Module[{p = 2}, While[! PrimeQ[n*(p+1)-1], p = NextPrime[p]]; p]; record = 0; a[0] = 0; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[q[k] > record, record = q[k]; Print[k]; Return[k]]]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Nov 18 2013 *)

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

A255598 a(n) is the minimal number q>1 such that n(q+1)-1 is prime, or -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, 4, 5, 2, 5, 3, 3, 2, 5, 2, 13, 3, 3, 2, 3, 2, 11, 2, 5, 4, 3, 3, 5, 2, 3, 2, 5, 3, 5, 2, 9, 5, 3, 4, 7, 2, 3, 2, 5, 2, 7, 6, 3, 2, 5, 2, 5, 3, 11, 4, 3, 4, 13, 5, 5, 2, 3, 2, 7, 2, 7, 4, 3, 2, 5, 2, 3, 2, 15, 2, 7, 3, 5, 2, 3, 3, 11
Offset: 1

Views

Author

Zak Seidov, Feb 27 2015

Keywords

Comments

a(n) <= A060324(n), and a(n) = A060324(n) iff a(n) is prime.
Among first 10000 terms, in 2453 cases a(n) < A060324(n). First such cases are for n = 22, 40, 51, 54, 62, 70, 72, 82, 89, 100.
Also, among first 10^6 terms, in 324388 cases a(n) < A060324(n).

Crossrefs

Cf. A060324.

Programs

  • PARI
    a(n) = {my(q = 2); while (! isprime(n*(q+1)-1), q ++); q;} \\ Michel Marcus, Feb 27 2015
Showing 1-10 of 10 results.