login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228421 Count of the first 10^n primes which do not contain the digit 9. 20
1, 8, 69, 620, 5010, 45732, 418142, 3785060, 32579606, 296601070, 2683254222, 24354108057 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

FORMULA

a(n) <= 9^n. - Charles R Greathouse IV, May 21 2014

EXAMPLE

a(1) = 8 since there are 8 primes in the first 10 (through 29) that do not contain a 9.  Namely: 2, 3, 5, 7, 11, 13, 17, 23.

MATHEMATICA

Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 9] == 0 &]], {n, 0, 5}] (* Robert Price, Mar 23 2020 *)

PROG

(Python)

def a(n):

..count = 0

..for k in range(1, 10**n+1):

....if str(prime(k)).find('9')==-1:

......count += 1

..return count

n = 0

while n < 10:

..print(a(n), end=', ')

..n += 1

# Derek Orr, Jul 27 2014

CROSSREFS

Cf. A231412, A228413-A228421, A097952, A091634-A091643.

Sequence in context: A152279 A015575 A214344 * A152109 A222064 A317096

Adjacent sequences:  A228418 A228419 A228420 * A228422 A228423 A228424

KEYWORD

more,nonn,base,changed

AUTHOR

Robert Price, Nov 09 2013

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 April 4 05:34 EDT 2020. Contains 333212 sequences. (Running on oeis4.)