RPL exercise  Last Digits of Primes (HP 49G, G+, 50g)

06012019, 12:42 PM
(This post was last modified: 06012019 12:57 PM by Albert Chan.)
Post: #8




RE: RPL exercise  Last Digits of Primes (HP 49G, G+, 50g)
(06012019 05:29 AM)Gilles Wrote: for 10'000, I get { 2485 2515 2500 2492 } in 0.97sec Hi, Gilles Since OP started with "first" prime of 7, prime last digits must be 1,3,7,9 In other words, sum of the distributions must add up back to number of primes. We can even optimize the code by counting only 1,3,7's, and derive count of 9's For 10,000: 1,3,7,9's should be {2485 2515 2508 2492} For 100,000: 1,3,7,9's should be {24968 25008 25015 25009} 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)