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

A064652 Primes q associated with A064632.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 3, 3, 2, 3, 2, 5, 3, 3, 2, 7, 2, 11, 3, 3, 2, 3, 5, 5, 3, 5, 2, 3, 2, 11, 7, 3, 5, 3, 2, 5, 7, 3, 2, 3, 2, 5, 3, 5, 2, 7, 3, 5, 3, 3, 2, 3, 3, 7, 3, 5, 2, 13, 2, 7, 7, 3, 5, 3, 2, 5, 3, 3, 2, 13, 2, 5, 3, 3, 7, 7, 2, 5, 43, 3, 2, 3, 5, 13, 3, 5, 2, 3, 3, 7, 19, 5, 11, 3, 2, 5, 3, 3, 2
Offset: 2

Views

Author

Robert G. Wilson v, Oct 16 2001

Keywords

Examples

			a(7) = 5 because (29-1)/(5-1).
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := (k = n + 1; While[ !PrimeQ[k], k++ ]; k); Do[p = 2; While[q = (p - 1)/n + 1; !PrimeQ[q] || q >= p, p = NextPrim[p]]; Print[q], {n, 2, 100} ]

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

A064673 Where the least prime p such that n = (p-1)/(q-1) and p > q is not the least prime == 1 (mod n) (A034694).

Original entry on oeis.org

24, 32, 34, 38, 62, 64, 71, 76, 80, 92, 94, 104, 110, 117, 122, 124, 129, 132, 144, 149, 152, 154, 159, 164, 167, 182, 184, 185, 188, 201, 202, 206, 212, 214, 218, 220, 225, 227, 236, 242, 244, 246, 252, 264, 269, 272, 274, 286, 290, 294
Offset: 1

Views

Author

Robert G. Wilson v, Oct 16 2001

Keywords

Examples

			24 is in the sequence because (97-1)/(5-1) whereas the first prime ==1 (Mod 24) is 73. See the comment in A034694 about the multiplier k and it must differ from q-1 or k+1 is not prime.
		

Crossrefs

Cf. A034694, A064632, A064652. Disjoint from A005097 and A006093.

Programs

  • Maple
    f:= proc(n) local k;
      for k from n+1 by n do
        if isprime(k) then return k fi
      od
    end proc:
    filter:= proc(n) local p;
        p:= f(n);
        not isprime(1+(p-1)/n)
    end proc:
    select(filter, [$1..1000]); # Robert Israel, May 09 2024
  • Mathematica
    NextPrim[n_] := (k = n + 1; While[ !PrimeQ[k], k++ ]; k); Do[p = 2; While[q = (p - 1)/n + 1; !PrimeQ[q] || q >= p, p = NextPrim[p]]; k = 1; While[ !PrimeQ[k*n + 1], k++ ]; If[p != k*n + 1, Print[n]], {n, 2, 300} ]
Showing 1-6 of 6 results.