login
A375642
a(n) is the number of i for which n - Fibonacci(i) is prime.
3
0, 1, 3, 3, 3, 3, 3, 4, 1, 3, 2, 3, 3, 3, 3, 3, 1, 4, 3, 4, 2, 2, 2, 5, 2, 3, 1, 2, 1, 3, 3, 5, 1, 3, 0, 3, 3, 3, 3, 2, 2, 4, 2, 5, 3, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 1, 4, 3, 5, 2, 3, 1, 3, 2, 4, 2, 1, 2, 5, 2, 6, 3, 2, 1, 2, 2, 4, 3, 2, 1, 5, 1, 3, 2, 2, 1, 2, 3, 5, 1, 3, 1, 3, 2, 3, 1
OFFSET
1,3
LINKS
EXAMPLE
a(5) = 3 because 5 - Fibonacci(0) = 5, 5 - Fibonacci(3) = 3 and 5 - Fibonacci(4) = 2 are prime.
MAPLE
fcount:= proc(n) local f, i, d, c;
c:= 0;
for i from 0 do
f:= combinat:-fibonacci(i);
if f >= n then return c fi;
if isprime(n-f) then
c:= c+1;
fi
od;
end proc:
map(f, [$1..200]);
MATHEMATICA
a[n_]:=Sum[Boole[PrimeQ[n-Fibonacci[i]]], {i, Select[Range[0, n], n>Fibonacci[#]&]}]; Array[a, 99] (* Stefano Spezia, Aug 23 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Aug 22 2024
STATUS
approved