cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jan 26 2003

Keywords

Crossrefs

Programs

  • 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)

Extensions

Changed "was found" to "exists" in definition. Offset was wrong. Adjusted initial terms. - N. J. A. Sloane, Jan 29 2022