OFFSET
1,1
COMMENTS
a(92) > 10000, a(93)..a(133) = {37, 3, 17, 5, 11, 31, 577, 271, 3, 19, 13, 3, 41, 137, 3, 281, 13, 7, 239, 0, 5, 11, 3, 113, 7, 7, 5, 17, 0, 3, 17, 5, 7, 19, 5, 23, 2011, 31, 5, 5, 13}, a(134) > 10000, a(135)..a(139) = {41, 37, 5, 5, 3}, a(140) > 10000, a(141)..a(150) = {29, 5, 3, 0, 13, 3, 17, 17, 113, 193}.
FORMULA
a(n) = A084740(2n+1).
EXAMPLE
a(23) = 127 because 2 * 23 + 1 = 47, (47^k-1)/46 is composite for k = 2, 3, ..., 126 and prime for k = 127.
PROG
(PARI) a(n) = {l=List([4, 12, 24, 40, 60, 62, 84]); for(q=1, 91, if(n==l[q], return(0))); k=1; while(k, s=((2*n+1)^prime(k)-1)/(2*n); if(ispseudoprime(s), return(prime(k))); k++)} \\ Eric Chen, Nov 14 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Chen, Nov 13 2014
STATUS
approved