login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345325 Number of primes less than 10^n with digits in nondecreasing order. 2
0, 4, 16, 50, 132, 315, 689, 1413, 2636, 4967, 8563, 14481, 23593, 37127, 56809, 86779, 127096, 184517, 264288, 368794, 510442, 707483, 948307, 1268871, 1689642, 2204795, 2866855, 3729223, 4738019, 6013021, 7619227, 9510372, 11832748, 14770667, 18067652 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Number of primes with at most n digits arranged in nondecreasing order.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..42
MATHEMATICA
Table[Length@Select[Prime@Range[PrimePi[10^n]], OrderedQ@IntegerDigits@#&], {n, 0, 7}] (* Giorgos Kalogeropoulos, Jul 22 2021 *)
PROG
(Python)
from sympy import isprime
from itertools import accumulate, combinations_with_replacement as mc
def numwithdigs(d):
if d == 0: return 0
nonincreasing = (int("".join(m)) for m in mc("123456789", d))
return len(list(filter(isprime, nonincreasing)))
def aupto(nn): return list(accumulate(numwithdigs(d) for d in range(nn+1)))
print(aupto(14)) # Michael S. Branicky, Jul 22 2021
CROSSREFS
Sequence in context: A217950 A217949 A227675 * A203094 A298173 A323932
KEYWORD
nonn,base,hard
AUTHOR
Ilya Gutkovskiy, Jul 22 2021
EXTENSIONS
a(11)-a(34) from Michael S. Branicky, Jul 22 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)