Primes with digits in nondecreasing order: Difference between revisions
Primes with digits in nondecreasing order (view source)
Revision as of 00:57, 3 April 2021
, 3 years ago→{{header|Julia}}: add 16
(Added Visual Basic .NET, (translation of C#).) |
(→{{header|Julia}}: add 16) |
||
Line 233:
const range = 2:999
for base in [2:10...;[
primes = filter(n -> isprime(n) && issorted(digits(n, base=base), rev=true), range)
println("\nBase $base: ", length(primes), " non-descending primes between 1 and ",
Line 272:
277 337 347 349 359 367 379 389 449 457 467 479 499 557 569 577
599 677
Base
2 3 5 7
18d 199 1af 1bb 1cd 1cf 1df 223 22d 233 239 23b 24b 257 259 25f
269 26b 277 28d 2ab 2bd 2cf 2dd 2ef 335 337 33b 33d 347 355 359
35b 35f 36d 377 38b 38f 3ad 3df
Base 17: 82 non-descending primes between 1 and 37b:
2 3 5 7 b d 12 16 1c 1e 23 27 29 2d 38 3a
|