login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104638 Number of odd digits in n-th prime. 4
0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 2, 2, 3, 3, 2, 3, 3, 3, 3, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, 3, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

The only zero is the first term. Sequence is unbounded. - Zak Seidov, Jan 12 2016

From Robert Israel, Jan 12 2016: (Start)

For any N, the asymptotic density of terms >= N is 1.

On the other hand, a(n) = 2 if prime(n) is in A159352, which is conjectured to be infinite.

Record values: a(2) = 1, a(5) = 2, a(30) = 3, a(187) = 4, a(1346) = 5, a(10545) = 6, a(86538) = 7, a(733410) = 8.

(End)

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A196564(A000040(n)). - Michel Marcus, Oct 05 2013

MAPLE

seq(nops(select(type, convert(ithprime(i), base, 10), odd)), i=1..100); # Robert Israel, Jan 12 2016

MATHEMATICA

Table[Count[IntegerDigits[Prime[n]], _?OddQ], {n, 100}] (* Harvey P. Dale, Jan 22 2012 *)

Table[Total[Mod[IntegerDigits[Prime[n]], 2]], {n, 100}] (* Vincenzo Librandi, Jan 13 2016 *)

PROG

(PARI) a(n)=vecsum(digits(prime(n)%2)) \\ Zak Seidov, Jan 12 2016

CROSSREFS

Cf. A104637, A159352.

Sequence in context: A323827 A275850 A112505 * A270648 A057155 A037812

Adjacent sequences:  A104635 A104636 A104637 * A104639 A104640 A104641

KEYWORD

easy,nonn,base

AUTHOR

Zak Seidov, Mar 18 2005

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 June 20 09:27 EDT 2019. Contains 324234 sequences. (Running on oeis4.)