login
A086545
Smallest k such that n*k+1 is a prime and (n-1)/k is noncomposite, or 0 if no such number exists.
0
1, 2, 1, 2, 1, 6, 0, 4, 3, 2, 1, 4, 0, 2, 15, 8, 1, 0, 0, 10, 3, 2, 0, 24, 5, 0, 27, 0, 1, 10, 0, 0, 3, 2, 5, 0, 0, 2, 13, 20, 1, 0, 0, 4, 15, 0, 0, 0, 0, 50, 3, 0, 0, 18, 5, 8, 19, 0, 1, 12, 0, 2, 9, 32, 5, 66, 0, 4, 3, 0, 1, 24, 0, 2, 25, 38, 7, 78, 0, 16, 0, 2, 0, 12, 5, 0, 0, 44, 89, 30, 0, 4, 3, 2
OFFSET
2,2
EXAMPLE
a(7) = 6 as 7*6 + 1 = 43 is a prime and (7 - 1)/6 = 1 is noncomposite.
a(10) = 3 as 10*3 + 1 = 31 and (10 - 1)/3 = 3 both are primes.
CROSSREFS
Sequence in context: A217437 A152823 A324605 * A337395 A126083 A356158
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 26 2003
EXTENSIONS
Corrected and extended by David Wasserman, Mar 22 2005
STATUS
approved