OFFSET
1,1
COMMENTS
Conjecture: a(n) < sqrt(n)*log(n) for all n > 17261. This has been verified for n up to 3*10^7. It implies the inequality a(n) < n for each n > 127. - Zhi-Wei Sun, Jan 07 2013
A200996(n) <= a(n). - Reinhard Zumkeller, Feb 14 2013
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
MATHEMATICA
Table[k=1; While[!And@@PrimeQ[n*k+{1, -1}], k++]; k, {n, 86}] (* Jayanta Basu, May 26 2013 *)
PROG
(PARI) for(n=1, 100, s=1; while(isprime(s*n+1)*isprime(n*s-1)==0, s++); print1(s, ", "))
(Haskell)
a071558 n = head [k | k <- [1..], let x = k * n,
a010051' (x - 1) == 1, a010051' (x + 1) == 1]
-- Reinhard Zumkeller, Feb 14 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 30 2002
STATUS
approved