login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A156606 a(n)=number of even digits in prime(n) + number of prime digits in prime(n). 0
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, 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, 3, 2, 3, 2, 3, 3, 2, 3, 2, 2, 2, 2, 1, 3, 2, 3, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Even digits are 2, 4, 6 or 8 and prime digits are 2, 3, 5 or 7.

LINKS

Table of n, a(n) for n=1..86.

EXAMPLE

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.

MAPLE

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

MATHEMATICA

nepd[n_]:=Module[{p=IntegerDigits[Prime[n]]}, Count[p, _?EvenQ]+Count[ p, _?PrimeQ]]; Array[nepd, 120] (* Harvey P. Dale, Dec 09 2017 *)

CROSSREFS

Sequence in context: A053252 A261029 A117195 * A324606 A194087 A107034

Adjacent sequences:  A156603 A156604 A156605 * A156607 A156608 A156609

KEYWORD

nonn,base,less

AUTHOR

Juri-Stepan Gerasimov, Feb 11 2009

EXTENSIONS

Corrected by Harvey P. Dale, Dec 09 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 10:49 EDT 2021. Contains 343839 sequences. (Running on oeis4.)