login
Fibonacci numbers in which parity of the decimal digits alternates.
0

%I #12 Jun 30 2020 07:05:27

%S 0,1,2,3,5,8,21,34,89,610,987,4181,6765

%N Fibonacci numbers in which parity of the decimal digits alternates.

%C No more values through F(19000). - _R. J. Mathar_, Jun 30 2020

%F A000045 INTERSECTION A030141.

%p isA030141 := proc(n)

%p dgs := convert(n,base,10) ;

%p for i from 2 to nops(dgs) do

%p if modp(op(i,dgs),2) = modp(op(i-1,dgs),2) then

%p return false;

%p end if;

%p end do:

%p true ;

%p end proc:

%p for i from 0 do

%p f := combinat[fibonacci](i) ;

%p if isA030141(f) then

%p print(f) ;

%p end if;

%p end do: # _R. J. Mathar_, Mar 13 2015

%Y Cf. A000045, A030141, A030152, A030144.

%K nonn,base

%O 1,3

%A _Jonathan Vos Post_, Sep 12 2013