cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A155498 Number of odd digits in the concatenation of first n primes.

This page as a plain text file.
%I A155498 #14 Apr 05 2025 14:24:31
%S A155498 0,1,2,3,5,7,9,11,12,13,15,17,18,19,20,22,24,25,26,28,30,32,33,34,36,
%T A155498 38,40,42,44,47,49,52,55,58,60,63,66,68,70,73,76,78,81,84,87,90,92,93,
%U A155498 94,95,97,99,100,102,104,105,106,108,110,111,112,114,116,119,122,125,128
%N A155498 Number of odd digits in the concatenation of first n primes.
%C A155498 Partial sums of A104638. [_R. J. Mathar_, Feb 13 2009]
%H A155498 Robert Israel, <a href="/A155498/b155498.txt">Table of n, a(n) for n = 1..10000</a>
%e A155498 If n=1, concatenate first 1 prime = 2, then number of odd digits = 0 = a(1).
%e A155498 If n=2, concatenate first 2 primes = 23, then number of odd digits = 1 = a(2).
%e A155498 If n=3, concatenate first 3 primes = 235, then number of odd digits = 2 = a(3).
%p A155498 ListTools:-PartialSums([seq(nops(select(type, convert(ithprime(i), base, 10), odd)), i=1..100)]); # _Robert Israel_, Jul 15 2018
%t A155498 Accumulate[Table[Count[IntegerDigits[p],_?OddQ],{p,Prime[Range[100]]}]] (* _Harvey P. Dale_, Apr 05 2025 *)
%o A155498 (PARI) a(n) = sum(k=1, n, #select(x->(x%2), digits(prime(k)))); \\ _Michel Marcus_, Jul 16 2018
%Y A155498 Cf. A000040, A068670.
%K A155498 nonn,base
%O A155498 1,3
%A A155498 _Juri-Stepan Gerasimov_, Jan 23 2009
%E A155498 Replaced 53 by 55. _R. J. Mathar_, Feb 13 2009