OFFSET
1,1
COMMENTS
A conjecture of Schinzel, if true, would imply that such a q always exists.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Matthew M. Conroy, A sequence related to a conjecture of Schinzel, J. Integ. Seqs. Vol. 4 (2001), #01.1.7.
Peter Luschny, Schinzel-Sierpinski conjecture and Calkin-Wilf tree.
FORMULA
a(n) = (A062251(n)+1) / n - 1. - Reinhard Zumkeller, Aug 28 2014
EXAMPLE
1 = (2+1)/(2+1), so the first term is 2; 3(2+1) - 1 = 8 which is not prime, yet 3(3+1) - 1 = 11 is prime (3 = (11+1)/(3+1)) so the 3rd term is 3.
MAPLE
a:= proc(n) local q;
q:= 2;
while not isprime(n*(q+1)-1) do
q:= nextprime(q);
od; q
end:
seq(a(n), n=1..300); # Alois P. Heinz, Feb 11 2011
MATHEMATICA
a[n_] := (q = 2; While[!PrimeQ[n*(q + 1) - 1], q = NextPrime[q]]; q); a /@ Range[100] (* Jean-François Alcover, Jul 20 2011, after Maple prog. *)
PROG
(Haskell)
a060324 n = head [q | q <- a000040_list, a010051' (n * (q + 1) - 1) == 1]
-- Reinhard Zumkeller, Aug 28 2014
(PARI) a(n) = {my(q=2); while (!isprime(n*(q+1)-1), q = nextprime(q+1)); q; } \\ Michel Marcus, Nov 20 2017
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
Matthew Conroy, Mar 29 2001
STATUS
approved