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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A156607 a(n) = number of odd decimal digits of n-th prime + number of prime decimal digits of n-th prime. 1
 1, 2, 2, 2, 2, 3, 3, 2, 3, 2, 3, 4, 1, 2, 2, 4, 3, 1, 2, 3, 4, 3, 2, 1, 3, 2, 3, 3, 2, 4, 4, 4, 5, 4, 2, 4, 5, 3, 3, 5, 4, 2, 3, 4, 4, 3, 3, 4, 4, 3, 5, 4, 2, 4, 5, 3, 2, 4, 5, 2, 3, 4, 4, 4, 5, 5, 5, 6, 4, 3, 6, 5, 4, 6, 5, 4, 3, 5, 1, 1, 2, 2, 3, 4, 3, 2, 1, 4, 1, 2, 2, 3, 2, 2, 2, 4, 3, 4, 5, 3, 4, 6, 4, 3, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Odd digits are 1, 3, 5, 7 and 9. Prime digits are 2, 3, 5 and 7. LINKS EXAMPLE prime(1)= 2 (0 odd digits, 1 prime), so a(1) = 0 + 1 = 1; prime(2)= 3 (1 odd digit,  1 prime), so a(2) = 1 + 1 = 2; prime(3)= 5 (1 odd digit,  1 prime), so a(3) = 1 + 1 = 2; prime(4)= 7 (1 odd digit,  1 prime), so a(4) = 1 + 1 = 2; prime(5)=11 (2 odd digits, 0 prime), so a(5) = 2 + 0 = 2; prime(6)=13 (2 odd digits, 1 prime), so a(6) = 2 + 1 = 3. MAPLE numPdgs := proc(n) local f, d ; f := 0 ; for d in convert(n, base, 10) do if d in {2, 3, 5, 7} then f :=f+1; end if; end do; f ; end proc: numOdddgs := proc(n) local f, d ; f := 0 ; for d in convert(n, base, 10) do if type(d, 'odd') then f :=f+1; end if; end do; f ; end proc: A156607 := proc(n) p := ithprime(n) ; numPdgs(p) + numOdddgs(p) ; end proc: seq(A156607(n), n=1..120) ; # R. J. Mathar, May 15 2010 MATHEMATICA d[n_]:=Module[{idn=IntegerDigits[n]}, Count[idn, _?OddQ]+Count[ idn, _?PrimeQ]]; d/@Prime[Range[150]] (* Harvey P. Dale, May 16 2014 *) CROSSREFS Cf. A000040, A104638. Sequence in context: A322168 A118377 A023516 * A093450 A096198 A103183 Adjacent sequences:  A156604 A156605 A156606 * A156608 A156609 A156610 KEYWORD nonn,base AUTHOR Juri-Stepan Gerasimov, Feb 11 2009 EXTENSIONS a(54) corrected by R. J. Mathar, May 15 2010 Example section edited by Jon E. Schoenfield, Feb 14 2019 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.

Last modified June 13 03:46 EDT 2021. Contains 344980 sequences. (Running on oeis4.)