OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..39
Matthew M. Conroy, A sequence related to a conjecture of Schinzel, J. Integ. Seqs. Vol. 4 (2001), #01.1.7.
EXAMPLE
a(3)=7, since q(7)=5 and q(j) < 5 for 0 < j < 7.
MATHEMATICA
q[n_] := Module[{p = 2}, While[! PrimeQ[n*(p+1)-1], p = NextPrime[p]]; p]; record = 0; a[0] = 0; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[q[k] > record, record = q[k]; Print[k]; Return[k]]]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Nov 18 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Conroy, Apr 10 2001
STATUS
approved