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.

A064632 Smallest prime p such that n = (p-1)/(q-1) for some prime q.

This page as a plain text file.
%I A064632 #32 Mar 14 2020 13:02:34
%S A064632 3,7,5,11,7,29,17,19,11,23,13,53,29,31,17,103,19,191,41,43,23,47,97,
%T A064632 101,53,109,29,59,31,311,193,67,137,71,37,149,229,79,41,83,43,173,89,
%U A064632 181,47,283,97,197,101,103,53,107,109,331,113,229,59,709,61,367,373
%N A064632 Smallest prime p such that n = (p-1)/(q-1) for some prime q.
%H A064632 Daria Micovic, <a href="/A064632/b064632.txt">Table of n, a(n) for n = 2..10000</a>
%H A064632 Matthew M. Conroy, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/CONROY/conroy.html">A sequence related to a conjecture of Schinzel</a>, , J. Integ. Seqs. Vol. 4 (2001), #01.1.7.
%e A064632 a(7) = 29 because (29-1)/(5-1).
%t A064632 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[p], {n, 2, 100} ]
%t A064632 spp[n_]:=Module[{p=2},While[!PrimeQ[(p-1)/n+1],p=NextPrime[p]];p]; Array[ spp,70,2] (* _Harvey P. Dale_, Aug 22 2019 *)
%o A064632 (Sage)
%o A064632 def A064632(n):
%o A064632     p, q = 0, 0
%o A064632     while not (q.is_prime() and q < p):
%o A064632         p = next_prime(p)
%o A064632         if p % n != 1: continue
%o A064632         q = (p - 1) // n + 1
%o A064632     return p # _Daria Micovic_, Apr 13 2016
%o A064632 (PARI) a(n) = {forprime(p=2, , forprime(q=2, p-1, if ((p-1)/(q-1) == n, return (p));););} \\ _Michel Marcus_, Apr 16 2016
%Y A064632 Similar to but not the same as A034694. Cf. A064652 (q-values), A064673.
%K A064632 easy,nonn
%O A064632 2,1
%A A064632 _Robert G. Wilson v_, Oct 16 2001
%E A064632 Definition corrected by _Stephanie Anderson_, Apr 16 2016