All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Erase a prime (Posted on 2020-08-03) Difficulty: 2 of 5
Write down the first n primes.

Erase one of them and the mean of the remaining numbers is 10.

What number did you erase?

No Solution Yet Submitted by Jer    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4
   10   for N=1 to 100
   20    P=nxtprm(P)
   30    Tot=Tot+P
   40    for I=1 to N
   50      T=Tot-prm(I)
   55      if N>1 then
   60      :Avg=T/(N-1)
   70      :if Avg=10 then print I,prm(I),N,P
   80    next
   90   next

finds

 4     7     8     19
 
meaning, 

erase the 4th prime, 7, from the first 8 primes, the last of which is 19.


2 + 3 + 5 + 11 + 13 + 17 + 19 = 70 checks out

  Posted by Charlie on 2020-08-03 13:45:23
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information