%I #13 Jul 26 2024 16:03:03
%S 13,21,34,1597,2584,6765,121393,514229,14930352,24157817,7778742049,
%T 365435296162,44945570212853,184551825793033096366333,
%U 781774079430987230203437,7896325826131730509282738943634332893686268675876375
%N Fibonacci numbers containing equal numbers of prime digits and nonprime digits.
%C It is obvious that these numbers must contain an even number of digits.
%C This sequence is probably finite. The equivalent sequences in bases 4, 6, and 8 are probably infinite. - _Franklin T. Adams-Watters_, Aug 06 2009
%H Simon Plouffe, <a href="http://ibiblio.org/pub/docs/books/gutenberg/etext01/fbncc10.txt">Project Gutenberg</a>
%e 24157817 is a Fibonacci number containing equal numbers of prime digits (2,5,7,7) and nonprime digits (4,1,8,1).
%t pnpQ[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];EvenQ[len] && Count[idn,_?PrimeQ]==len/2]; Select[Fibonacci[Range[250]],pnpQ] (* _Harvey P. Dale_, May 01 2012 *)
%o (PARI) (mydigits(n,b=10)=local(r);r=[];while(n>0,r=concat([n%b],r);n\=b);r); for(n=1,500,v=mydigits(fibonacci(n));np=sum(i=1,#v,isprime(v[i])); if(#v==2*np,print1(fibonacci(n)",")))
%Y Cf. A000045.
%K nonn,base
%O 1,1
%A _Parthasarathy Nambi_, Jul 21 2009
%E Edited and extended by _Franklin T. Adams-Watters_, Aug 06 2009