%I #7 Aug 23 2024 10:51:23
%S 2,9,17,27,29,33,59,65,70,77,83,85,89,90,93,95,99,121,123,124,127,129,
%T 133,143,145,146,153,155,166,169,174,179,188,189,190,195,203,210,217,
%U 219,222,237,239,243,249,258,261,267,269,289,297,302,303,305,308,309,310,321,323,327,331,333,335
%N Numbers that are the sum of a prime and a Fibonacci number in exactly one way.
%C Numbers k such that k - A000045(i) is prime for exactly one i >= 0.
%C 1 = Fibonacci(1) = Fibonacci(2), so cases where the Fibonacci number is 1 are counted as two ways. Also, if Fibonacci(i) and Fibonacci(j) are both primes (with i <> j), Fibonacci(i) + Fibonacci(j) and Fibonacci(j) + Fibonacci(i) are counted as two ways.
%H Robert Israel, <a href="/A375643/b375643.txt">Table of n, a(n) for n = 1..10000</a>
%e a(5) = 29 is a term because 29 - Fibonacci(i) is prime only for i = 0.
%p filter:= proc(n) local f,i,d,state;
%p state:= 0;
%p for i from 0 do
%p if i = 2 then next fi;
%p f:= combinat:-fibonacci(i);
%p if f >= n then return (state = 1) fi;
%p if isprime(n-f) then
%p state:= state+1;
%p if state = 2 then return false fi;
%p fi
%p od;
%p end proc:
%p select(filter, [$1..1000]);
%Y Cf. A000045, A132144, A375642. Contains A168383.
%K nonn
%O 1,1
%A _Robert Israel_, Aug 22 2024