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.

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