OFFSET
2,1
LINKS
Daria Micovic, Table of n, a(n) for n = 2..10000
Matthew M. Conroy, A sequence related to a conjecture of Schinzel, , J. Integ. Seqs. Vol. 4 (2001), #01.1.7.
EXAMPLE
a(7) = 29 because (29-1)/(5-1).
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[p], {n, 2, 100} ]
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 *)
PROG
(Sage)
def A064632(n):
p, q = 0, 0
while not (q.is_prime() and q < p):
p = next_prime(p)
if p % n != 1: continue
q = (p - 1) // n + 1
return p # Daria Micovic, Apr 13 2016
(PARI) a(n) = {forprime(p=2, , forprime(q=2, p-1, if ((p-1)/(q-1) == n, return (p)); ); ); } \\ Michel Marcus, Apr 16 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Oct 16 2001
EXTENSIONS
Definition corrected by Stephanie Anderson, Apr 16 2016
STATUS
approved