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.

A123627 Smallest prime q such that (q^p+1)/(q+1) is prime, where p = prime(n); or 0 if no such prime q exists.

Original entry on oeis.org

0, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 19, 61, 2, 7, 839, 89, 2, 5, 409, 571, 2, 809, 227, 317, 2, 5, 79, 23, 4073, 2, 281, 89, 739, 1427, 727, 19, 19, 2, 281, 11, 2143, 2, 1013, 4259, 2, 661, 1879, 401, 5, 4099, 1579, 137, 43, 487, 307, 547, 1709, 43, 3, 463, 2161, 353, 443, 2
Offset: 1

Views

Author

Alexander Adamchuk, Oct 04 2006, Aug 05 2008

Keywords

Comments

a(1) = 0 because such a prime does not exist, Mod[n^2+1,n+1] = 2 for n>1.
Corresponding primes (q^p+1)/(q+1), where prime q = a(n) and p = Prime[n], are listed in A123628[n] = {1,3,11,43,683,2731,43691,174763,2796203,402488219476647465854701,715827883,...}.
a(n) coincides with A103795[n] when A103795[n] is prime.
a(n) = 2 for n = PrimePi[A000978[k]] = {2,3,4,5,6,7,8,9,11,14,18,22,26,31,39,43,46,65,69,126,267,380,495,762,1285,1304,1364,1479,1697,4469,8135,9193,11065,11902,12923,13103,23396,23642,31850,...}.
Corresponding primes of the form (2^p + 1)/3 are the Wagstaff primes that are listed in A000979[n] = {3,11,43,683,2731,43691,174763,2796203,715827883,...}.

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,q;
      p:= ithprime(n);
      q:= 1;
      do
       q:= nextprime(q);
       if isprime((q^p+1)/(q+1)) then return q fi
      od
    end proc:
    f(1):= 0:
    map(f, [$1..70]); # Robert Israel, Jul 31 2019
  • Mathematica
    a(1) = 0, for n>1 Do[p=Prime[k]; n=1; q=Prime[n]; cp=(q^p+1)/(q+1); While[ !PrimeQ[cp], n=n+1; q=Prime[n]; cp=(q^p+1)/(q+1)]; Print[q], {k, 2, 61}]
    Do[p=Prime[k]; n=1; q=Prime[n]; cp=(q^p+1)/(q+1); While[ !PrimeQ[cp], n=n+1; q=Prime[n]; cp=(q^p+1)/(q+1)]; Print[{k,q}], {k, 1, 134}]
    spq[n_]:=Module[{p=Prime[n],q=2},While[!PrimeQ[(q^p+1)/(q+1)],q=NextPrime[ q]]; q]; Join[{0},Array[spq,70,2]] (* Harvey P. Dale, Mar 23 2019 *)

Formula

A123628(n) = (a(n)^prime(n) + 1) / (a(n) + 1).

A123487 Smallest prime q such that (q^p-1)/(q-1) is prime, where p = prime(n); or 0 if no such prime q exists.

Original entry on oeis.org

2, 2, 2, 2, 5, 2, 2, 2, 113, 151, 2, 61, 53, 89, 5, 307, 19, 2, 491, 3, 11, 271, 41, 2, 271, 359, 3, 2, 79, 233, 2, 7, 13, 11, 5, 29, 71, 139, 127, 139, 2003, 5, 743, 673, 593, 383, 653, 661, 251, 6389, 2833, 223, 163, 37, 709, 131, 41, 2203, 941, 2707, 13, 1283, 383
Offset: 1

Views

Author

Alexander Adamchuk, Sep 30 2006, Oct 02 2006

Keywords

Comments

Corresponding primes (q^p-1)/(q-1) are listed in A123488.
a(n) coincides with A066180(n) when A066180(n) is prime or 0.
From Robert G. Wilson v, Dec 28 2016: (Start)
Conjecture: Never is a(n) equal to 0.
Records: 2, 5, 113, 151, 307, 491, 2003, 6389, 7883, 11813, 18587, 31721, 40763, ... ;
First occurrence of the k_th prime: 1, 20, 5, 32, 21, 33, 81, 17, ... ;
Positions where two occurs: 1, 2, 3, 4, 6, 7, 8, 11, 18, 24, 28, 31, 98, 111, ... ;
Positions where three occurs: 20, 27, 100, 182, ... ;
Positions where five occurs: 5, 15, 35, 42, 114, 158, ... ; etc. (End)
Jones & Zvonkin conjecture (as did Robert G. Wilson v above) that a(n) > 0 for all n. - Charles R Greathouse IV, Jul 23 2021

Crossrefs

Programs

  • Mathematica
    f[n_] := NestWhile[NextPrime, 2, ! PrimeQ[Cyclotomic[Prime[n], #]] &]; Array[f, 63](* Davin Park, Dec 28 2016 and Robert G. Wilson v, Dec 28 2016 *)
  • PARI
    a(n) = {my(x = 2); while (!isprime(polcyclo(prime(n), x)), x= nextprime(x+1)); x;} \\ Michel Marcus, Dec 10 2016

A123628 Smallest prime of the form (q^p+1)/(q+1), where p = prime(n) and q is also prime (q = A123627(n)); or 1 if such a prime does not exist.

Original entry on oeis.org

1, 3, 11, 43, 683, 2731, 43691, 174763, 2796203, 402488219476647465854701, 715827883, 10300379826060720504760427912621791994517454717, 254760179343040585394724919772965278539769280548173566545431025735121201
Offset: 1

Views

Author

Alexander Adamchuk, Oct 03 2006

Keywords

Comments

a(1) = 1 because such a prime does not exist; (n^2+1) mod (n+1) = 2 for n > 1. a(n) = (A103795(n)^prime(n)+1)/(A103795(n)+1) when A103795(n) is prime. Corresponding smallest primes q such that (q^p+1)/(q+1) is prime, where p = prime(n), are listed in A123627(n) = {0, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 19, 61, 2, 7, 839, 1459, 2, 5, 409, 571, 2, ...}. All Wagstaff primes or primes of form (2^p + 1)/3 belong to a(n). Wagstaff primes are listed in A000979(n) = {3, 11, 43, 683, 2731, 43691, 174763, 2796203, 715827883, ...}. Corresponding indices n such that a(n) = (2^prime(n) + 1)/3 are PrimePi(A000978(n)) = {2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 22, 26, 31, 39, 43, 46, 65, 69, 126, 267, 380, 495, 762, 1285, 1304, 1364, 1479, 1697, 4469, 8135, 9193, 11065, 11902, 12923, 13103, 23396, 23642, 31850, ...}. All primes with prime indices in the Jacobsthal sequence A001045(n) belong to a(n).

Crossrefs

Formula

a(n) = (A123627(n)^prime(n) + 1) / (A123627(n) + 1).
Showing 1-3 of 3 results.