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!)
A345326 Number of primes less than 10^n with digits in nonincreasing order. 2
0, 4, 14, 49, 125, 296, 646, 1304, 2459, 4543, 7882, 13272, 21856, 34934, 53446, 82055, 121322, 175498, 251714, 354810, 488440, 676065, 914834, 1220629, 1627770, 2135954, 2759889, 3590609, 4602572, 5830588, 7386200, 9266652, 11469407, 14314939, 17658240 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Number of primes with at most n digits arranged in nonincreasing order.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..42
MATHEMATICA
Table[Length@Select[Prime@Range[PrimePi[10^n]], OrderedQ@Reverse@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("987654321", 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: A111299 A245824 A356121 * A327610 A110686 A071729
KEYWORD
nonn,base,hard
AUTHOR
Ilya Gutkovskiy, Jul 22 2021
EXTENSIONS
a(12)-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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)