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

Home > Just Math
Curious Consecutive Cyphers (Posted on 2008-11-25) Difficulty: 2 of 5
Each of the last T digits in the decimal representation of the product of 1!*2!*3!.....99!*100! is zero, but the (T+1)th digit from the right is nonzero.

Determine the remainder when T is divided by 1000.

Note: Try to derive a non computer-assisted method, although computer program/spreadsheet solutions are welcome.

See The Solution Submitted by K Sengupta    
Rating: 2.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: Solution | Comment 4 of 5 |
(In reply to Solution by Dej Mar)

Both UBASIC and MIRACL Calc agree that the (T+1)th digit from the right is an 8.  So I checked your figures.  I got, as a list of powers of primes in the number:

 2 4731
 3 2328
 5 1124
 7  734
11  414
13  343
17  250
19  220
23  174
29  129
31  117
37   91
41   79
43   73
47   61
53   48
59   42
61   40
67   34
71   30
73   28
79   22
83   18
89   12
97    4

These disagree in a couple of places from yours. They were obtained by the program:

DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97

DIM prime(25)

FOR i = 1 TO 25: READ prime(i): PRINT prime(i); : NEXT: PRINT

FOR p = 1 TO 25

  f = prime(p)
  t = 0
  FOR i = 1 TO 100
    f2 = f
    DO
      t = t + INT(i / f2)
      f2 = f2 * f
    LOOP UNTIL f2 > i
  NEXT
  PRINT USING "## ####"; f; t
  d = f MOD 10: tot(d) = tot(d) + t
NEXT

The next few lines of the program were added also:

PRINT tot(2) - 1124;
FOR i = 3 TO 9 STEP 2
  IF i <> 5 THEN
    PRINT tot(i);
  END IF
NEXT
PRINT

which tracks how many times the rightmost digit is 2 (in excess of the 1124), 3, 7 or 9 respectively:

3607  3012  1174  425

I see, for example, that your count of primes ending in 7 agree with mine:

7  734
17 250
37 91
47 61
67 34
97   4

These add to my 1174, rather than your 1248.

3607 mod 4 is 3 giving an 8.
3012 mod 4 is 0 giving a 1.
1174 mod 4 is 2 giving a 9.
425 mod 2 is 1 giving a 9.

8 x 1 x 9 x 8 = 648 so the last digit before the terminal zeros is 8.


  Posted by Charlie on 2008-11-25 17:30:13
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 (15)
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