login
A079669
a(n) = least k such that the distance from Fibonacci(k) to the closest prime is n, or -1 if no such k exists.
0
3, 1, 0, 9, 16, 12, 37, 42, 149, 33, 26, 27, 38, 24, 28, 189, 44, 111, 50, 66, 49, 57, 68, 30, 46, 81, 142, 78, 92, 96, 59, 69, 71, 141, 184, 267, 67, 129, 61, 117, 211, 576, 115, 372, 161, 138, 119, 198
OFFSET
0,1
PROG
(PARI) a(n)=if(n<0, 0, s=1; while(abs(n-min(abs(precprime(fibonacci(s))-fibonacci(s)), abs(nextprime(fibonacci(s))-fibonacci(s))))>0, s++); s)
CROSSREFS
Sequence in context: A355350 A221713 A261765 * A143398 A202995 A191578
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 26 2003
EXTENSIONS
Changed "was found" to "exists" in definition. Offset was wrong. Adjusted initial terms. - N. J. A. Sloane, Jan 29 2022
STATUS
approved