

A254861


Count of primes less than 10^n that do not contain the string n.


0




OFFSET

0,2


LINKS

Table of n, a(n) for n=0..9.


EXAMPLE

When n = 1, there are four primes less than 10: 2, 3, 5, and 7. None of these have 1 as a digit so a(1) = 4.


MATHEMATICA

f[n_] := Block[{i}, Flatten@ Map[Length, Last@ Reap@ For[i = 0, i <= n, i++, Sow@ Select[Range[10^i], PrimeQ@ # && DigitCount[#][[i]] == 0 &]], {2}]]; f@ 7 (* Michael De Vlieger, Mar 26 2015 *)


PROG

(Sage) [len([p for p in prime_range(10^n) if not(str(n) in str(p))]) for n in [1..9]] # Tom Edgar, Feb 17 2015


CROSSREFS

Cf. A006880.
Sequence in context: A079272 A197667 A007901 * A088581 A017970 A220740
Adjacent sequences: A254858 A254859 A254860 * A254862 A254863 A254864


KEYWORD

nonn,base,more


AUTHOR

Asa Kaplan, Feb 09 2015


EXTENSIONS

a(7)a(9) from Tom Edgar, Feb 17 2015


STATUS

approved



