login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A306890
a(n) is the number of prime digits used in writing out all primes up to and including the n-th prime.
0
1, 2, 3, 4, 4, 5, 6, 6, 8, 9, 10, 12, 12, 13, 14, 16, 17, 17, 18, 19, 21, 22, 23, 23, 24, 24, 25, 26, 26, 27, 29, 30, 32, 33, 33, 34, 36, 37, 38, 40, 41, 41, 41, 42, 43, 43, 44, 47, 50, 52, 55, 57, 58, 60, 63, 65, 66, 68, 71, 72, 74, 76, 78, 79
OFFSET
1,2
EXAMPLE
We have a(10) = 9 since all primes up to the 10th (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) use the 9 prime digits 2, 3, 5, 7, 3, 7, 2, 3, 2.
MATHEMATICA
With[{s = IntegerDigits[Prime@ Range@ 64]}, Array[Count[Flatten[s[[1 ;; #]] ], _?PrimeQ] &, Length@ s]] (* Michael De Vlieger, Mar 27 2019 *)
PROG
(PARI) a(n) = sum(k=1, prime(n), if (isprime(k), #select(x->isprime(x), digits(k)))); \\ Michel Marcus, Mar 23 2019
CROSSREFS
Partial sums of A109066. Cf. A068670.
Sequence in context: A274687 A234604 A236346 * A116549 A268382 A107079
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Mar 15 2019
STATUS
approved