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.

A375643 Numbers that are the sum of a prime and a Fibonacci number in exactly one way.

This page as a plain text file.
%I A375643 #7 Aug 23 2024 10:51:23
%S A375643 2,9,17,27,29,33,59,65,70,77,83,85,89,90,93,95,99,121,123,124,127,129,
%T A375643 133,143,145,146,153,155,166,169,174,179,188,189,190,195,203,210,217,
%U A375643 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 A375643 Numbers that are the sum of a prime and a Fibonacci number in exactly one way.
%C A375643 Numbers k such that k - A000045(i) is prime for exactly one i >= 0.
%C A375643 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 A375643 Robert Israel, <a href="/A375643/b375643.txt">Table of n, a(n) for n = 1..10000</a>
%e A375643 a(5) = 29 is a term because 29 - Fibonacci(i) is prime only for i = 0.
%p A375643 filter:= proc(n) local f,i,d,state;
%p A375643   state:= 0;
%p A375643   for i from 0 do
%p A375643     if i = 2 then next fi;
%p A375643     f:= combinat:-fibonacci(i);
%p A375643     if f >= n then return (state = 1) fi;
%p A375643     if isprime(n-f) then
%p A375643       state:= state+1;
%p A375643       if state = 2 then return false fi;
%p A375643     fi
%p A375643   od;
%p A375643 end proc:
%p A375643 select(filter, [$1..1000]);
%Y A375643 Cf. A000045, A132144, A375642. Contains A168383.
%K A375643 nonn
%O A375643 1,1
%A A375643 _Robert Israel_, Aug 22 2024