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!)
A028867 Primes with digits in nonincreasing order. 10
2, 3, 5, 7, 11, 31, 41, 43, 53, 61, 71, 73, 83, 97, 211, 311, 331, 421, 431, 433, 443, 521, 541, 631, 641, 643, 653, 661, 733, 743, 751, 761, 773, 811, 821, 853, 863, 877, 881, 883, 887, 911, 941, 953, 971, 977, 983, 991, 997, 2111, 2221, 3221 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (terms n = 1..1000 from T. D. Noe)
MATHEMATICA
t={}; Do[p=Prime[n]; If[Select[Differences[IntegerDigits[p]], #>0&]=={}, AppendTo[t, p]], {n, 460}]; t (* Jayanta Basu, May 04 2013 *)
Select[Prime[Range[600]], Max[Differences[IntegerDigits[#]]]<1&] (* Harvey P. Dale, Oct 30 2013 *)
PROG
(PARI) is(n)=my(d=digits(n)); for(i=2, #d, if(d[i]>d[i-1], return(0))); isprime(n) \\ Charles R Greathouse IV, Aug 18 2017
(Python)
from itertools import count, islice, combinations_with_replacement
from sympy import isprime
def A028867_gen(): # generator of terms
yield from (2, 3, 5, 7)
a, b = {'1':1, '2':1, '3':2, '4':2, '5':2, '6':2, '7':3, '8':3, '9':4}, (1, 3, 7, 9)
for l in count(1):
mlist = []
for d in combinations_with_replacement('987654321', l):
k = 10*int(''.join(d))
for e in b[:a[d[-1]]]:
if isprime(m:=k+e):
mlist.append(m)
yield from sorted(mlist)
A028867_list = list(islice(A028867_gen(), 30)) # Chai Wah Wu, Dec 25 2023
CROSSREFS
Sequence in context: A155081 A157158 A155833 * A104154 A123214 A119834
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Definition corrected by Omar E. Pol, Mar 22 2012
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 March 28 04:13 EDT 2024. Contains 371235 sequences. (Running on oeis4.)