login
Sum of odd digits (1,3,5,7,9) of n-th prime.
2

%I #9 Jul 30 2015 22:32:36

%S 0,3,5,7,2,4,8,10,3,9,4,10,1,3,7,8,14,1,7,8,10,16,3,9,16,2,4,8,10,5,8,

%T 5,11,13,10,7,13,4,8,11,17,2,11,13,17,19,2,3,7,9,6,12,1,6,12,3,9,8,14,

%U 1,3,12,10,5,7,11,7,13,10,12,11,17,10,13,19,6,12,19,1,9,10,1,4,6,12,3,9,12

%N Sum of odd digits (1,3,5,7,9) of n-th prime.

%F a(n) = A007605(n) - A104261(n).

%t sodod={};Do[id=IntegerDigits[Prime[i]];lid=Length[id];sod=Sum[If[OddQ[id[[k]]], id[[k]], 0], {k, lid}];sodod={sodod, sod}, {i, 200}];sodod//Flatten

%t f[n_] := Plus @@ Select[ IntegerDigits[ Prime[n]], OddQ[ # ] &]; Table[ f[n], {n, 88}] (* _Robert G. Wilson v_, Nov 03 2005 *)

%Y Sum of even digits (2, 4, 6, 8) of n-th prime: A104261, sum of prime digits (2, 3, 5, 7) of n-th prime: A104250, sum of composite (nonprime) digits (1, 4, 6, 8, 9) of n-th prime: A104251, sum of digits of primes: A007605, primes: A000040.

%K nonn,base

%O 1,2

%A _Zak Seidov_, Feb 26 2005