%I #12 Dec 09 2017 09:30:56
%S 2,1,1,1,0,1,1,0,3,2,1,2,1,2,2,2,1,1,2,1,2,1,2,1,1,1,2,2,1,1,3,1,2,1,
%T 1,1,2,2,2,2,1,1,0,1,1,0,2,5,5,4,4,3,3,3,4,4,3,3,4,3,4,3,3,1,2,2,2,3,
%U 3,2,3,2,3,3,2,3,2,2,2,2,1,3,2,3,2,3
%N a(n)=number of even digits in prime(n) + number of prime digits in prime(n).
%C Even digits are 2, 4, 6 or 8 and prime digits are 2, 3, 5 or 7.
%e If prime(1)=2(even, prime), then 1+1=2=a(1). If prime(2)=3(0, prime), then 0+1=1=a(2). If prime(3)=5(0, prime), then 0+1+1=a(3). If prime(4)=7(0, prime), then 0+1=1+a(4). If prime(5)=11(0, 0), then 0+0=0=a(5), etc.
%p npris := proc(n) local dgs,a,i ; dgs := convert(n,base,10) ; a := 0 ; for i in dgs do if isprime(i) then a := a+1 ; fi; od: a ; end: nevsnot0 := proc(n) local dgs,a,i ; dgs := convert(n,base,10) ; a := 0 ; for i in dgs do if i mod 2 = 0 and i <> 0 then a := a+1 ; fi; od: a ; end: for n from 1 to 800 do p := ithprime(n) ; printf("%d,",nevsnot0(p)+npris(p)) ; od: # _R. J. Mathar_, Feb 13 2009
%t nepd[n_]:=Module[{p=IntegerDigits[Prime[n]]},Count[p,_?EvenQ]+Count[ p, _?PrimeQ]]; Array[nepd,120] (* _Harvey P. Dale_, Dec 09 2017 *)
%K nonn,base,less
%O 1,1
%A _Juri-Stepan Gerasimov_, Feb 11 2009
%E Corrected by _Harvey P. Dale_, Dec 09 2017