|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Changed "was found" to "exists" in definition. Offset was wrong. Adjusted initial terms. - N. J. A. Sloane, Jan 29 2022
|
|
STATUS
|
approved
|
|
|
|