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

Home > Just Math
Averaging factorials (Posted on 2024-03-16) Difficulty: 3 of 5
Let m and n be one digit integers (0 to 9) with m>n

1a. Evaluate the mean value of (m!-n!)mod(10)
1b. Evaluate the mean value of (m!-n!)mod(3)

Let m and n be two digit integers (10 to 99) with m>n

2a. Evaluate the mean value of (m!-n!)mod(10)
2b. Evaluate the mean value of (m!-n!)mod(3)

3. Find recursive formulas for n digit integers.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts thoughts and calculations | Comment 1 of 2
          n
 m  0  1  2  3  4  5  6  7  8
 
 1  0         mod 10
 2  1  1
 3  5  5  4               mean = 4.71111111111111
 4  3  3  2  8                     ( 212/45 )
 5  9  9  8  4  6
 6  9  9  8  4  6  0
 7  9  9  8  4  6  0  0
 8  9  9  8  4  6  0  0  0
 8  9  9  8  4  6  0  0  0  0
  
 1  0         mod 3
 2  1  1
 3  2  2  1
 4  2  2  1  0             mean = 0.822222222222222
 5  2  2  1  0  0                   ( 37/45 )
 6  2  2  1  0  0  0
 7  2  2  1  0  0  0  0
 8  2  2  1  0  0  0  0  0
 9  2  2  1  0  0  0  0  0  0

 2-digit m and n are all zero

 Mod 10 becomes zero when n! starts to include 5.
 Mod 3 becomes zero when n! starts to include 3.



clearvars,clc
for k=[10 3];
for m=1:9
  for n=0:m-1
    f=F(m,n,k);
    fprintf('%3d',f)
  end
  fprintf('\n')
end
fprintf('\n')
end

for k=[10  3];
for m=sym(11):30
  for n=sym(10):m-1
    f=F(m,n,k);
    fprintf('%3d',f)
  end
  fprintf('\n')
end
fprintf('\n')
end

function v=F(m,n,k)
  v=mod(factorial(m)-factorial(n),k);
end


  Posted by Charlie on 2024-03-16 13:20:43
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 (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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