Thread: Intriguing numbers

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    3

    Intriguing numbers

    Consider in some base B numbers of N1 x N2 digits, N1 "groups" each made by N2 digits.
    (ex.N2=4 we have N1 "octets")
    For all pairs of 2 digits in any 2 positions let say i,j as b_i,b_j in the same group one may define the difference:
    d(i,j) = b_j - b_i
    If we take in any other group a pair in the same positions i,j the difference must not be equal with -d(i,j)

    Can someone write a C code such that:
    - at input reads 2 positive integers N1 & N2 at most 20;
    - outputs the smallest base B for which such number exists & one of these intriguing numbers!

    Regards,

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    http://cboard.cprogramming.com/annou...ouncementid=51
    http://cboard.cprogramming.com/annou...ouncementid=39

    Feel free to start another thread after you actually make an attempt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Comparing numbers to a list of numbers held in a text file
    By jmajeremy in forum C++ Programming
    Replies: 3
    Last Post: 11-06-2006, 07:56 AM
  2. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  3. Intriguing numbers - again
    By heartwork in forum C Programming
    Replies: 3
    Last Post: 10-07-2005, 08:09 AM
  4. the definition of a mathematical "average" or "mean"
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 12-03-2002, 11:15 AM
  5. A (complex) question on numbers
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 02-03-2002, 06:38 PM