|
|
A362376
|
|
a(n) is the least k such that Fibonacci(n)*Fibonacci(k) + 1 is a prime, and -1 if no such k exists.
|
|
2
|
|
|
1, 1, 1, 3, 3, 3, 9, 3, 4, 9, 3, 4, 3, 27, 4, 24, 24, 4, 3, 6, 3, 3, 444, 3, 12, 9, 3, 63, 6, 8, 36, 6, 36, 12, 12, 4, 21, 60, 4, 3, 24, 73, 51, 3, 11, 51, 12, 4, 504, 12, 3, 33, 21, 6, 9, 6, 4, 384, 21, 7, 54, 3, 4, 51, 24, 63, 30, 24, 11, 45, 72, 6, 39, 9, 22, 42, 12, 16, 60, 30
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
The frequencies seem interesting. In the early terms, 5 appears notably rarely, i.e., not until at a(240), whereas several other numbers appear notably frequently, e.g., 24 appears 13 times before a(240). - Peter Munn, May 03 2023
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n=4, Fibonacci(4)=3 and 3*Fibonacci(k)+1 is not prime until k reaches 3, so a(4)=3.
|
|
MATHEMATICA
|
Table[m = Fibonacci[n]; k = 1; While[! PrimeQ[m*Fibonacci[k] + 1], k++]; k, {n, 120}] (* Michael De Vlieger, May 03 2023 *)
|
|
PROG
|
(PARI) a(n) = my(F=fibonacci(n), k=1); while (!ispseudoprime(F*fibonacci(k) + 1), k++); k; \\ Michel Marcus, Apr 18 2023
(Python)
from itertools import count
from sympy import fibonacci, isprime
a = b = fibonacci(n)
for k in count(1):
if isprime(a+1):
return k
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|