Numbers are 1,2,3,4,5,6,7 Numbers having string (154)=(154),2,3,6,7=5 ! Numbers having string (2467)=(2467),1,3,5=4 ! Number having string (154) and (2467) =(154),(2467)=2! Now n(154∪2467)=5!+4!−2! =120+24−2=142 Again total numbers =7!=5040 Now required numbers =n (neither 154 nor 2467) =5040−142 =4898