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

Home > Numbers > Sequences
Digital Combo-Lock (Posted on 2010-12-30) Difficulty: 4 of 5

No Solution Yet Submitted by brianjn    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts a thought | Comment 1 of 6

DATA "0426597138","2365478109","2581470369","8103627495"
CLS
FOR seq = 1 TO 4
  PRINT seq
  READ s$
  FOR i = 1 TO 10
    dig(i) = VAL(MID$(s$, i, 1))
  NEXT
  FOR a = 1 TO 9
   FOR b = 0 TO 9
    good = 1
    FOR i = 1 TO 9
      v = (a * dig(i) + b) MOD 10
      IF v <> dig(i + 1) THEN good = 0
    NEXT
    IF good THEN PRINT a, b
   NEXT
  NEXT
  PRINT : PRINT
NEXT seq

finds that only the third column has a linear relation mod 10, and is in fact the sequence given in the example, when using the up arrow.

The others must not be of the form f(x)= (a*f(x-1)+b) mod 10.


  Posted by Charlie on 2010-12-30 11:54:10
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 (21)
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