Smarandache prime-digital sequence: Difference between revisions

m
No edit summary
Line 685:
main = do
printf "The first 25 SPDS:\n%s\n\n" $ f smarandache
mapM_ (uncurry (printf "The %8s8sth SPDS: %15s\n")) $
nextSPDSTerms [100, 1_000, 10_000, 100_000]
where
Line 694:
[2,3,5,7,23,37,53,73,223,227,233,257,277,337,353,373,523,557,577,727,733,757,773,2237,2273]
 
The 100100th SPDS: 33,223
The 1,000000th SPDS: 3,273,527
The 10,000000th SPDS: 273,322,727
The 100,000000th SPDS: 23,325,232,253
./smarandache_optimized 1.23s20s user 0.04s system 7680% cpu 1.653531 total
</pre>
 
=={{header|J}}==
Prime numbers have a built-in verb p: . It's easy and quick to get a list of prime numbers and determine which are composed entirely of the appropriate digits.
Anonymous user