
Number Theory Number Theory Math Forum 
 LinkBack  Thread Tools  Display Modes 
February 4th, 2017, 06:22 PM  #1 
Newbie Joined: Feb 2017 From: DELHI Posts: 2 Thanks: 0 
A number is given. That number is appended to itself n times (n can be as large as 10^10). I need to find the number thus formed modulo m. Let the number be 12 and n be 4, so number thus formed is 12121212. Let us find this number modulo 11, then the answer is 4. I tried to find the pattern like if the number is 12, I appended 12 again and took modulo with the given number (m) and went on appending and finding the modulo. For different m, I got different patterns. Sometimes it is alternate remainder and zero or sometimes 2*remainder kind of thing. But I could not find something concrete on which I can write an algorithm. Last edited by skipjack; February 6th, 2017 at 02:12 AM. 
February 6th, 2017, 03:01 AM  #2 
Global Moderator Joined: Dec 2006 Posts: 20,476 Thanks: 2039 
This thread is locked for a week as its author has pointed out that it is part of a problem in an open programming contest.


Tags 
appending, finding, modular arithmetic, modulo, number, times 
Search tags for this page 
appending a number to itself n times and modulo m,number a appended to itself n times in a row,appending a number to itself n times and modulo,modulo of a number formed by appending number to itself
Click on a term to search for related topics.

Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
One number is four more than five times another. If their sum is decreased by six....  GIjoefan1976  Algebra  15  February 29th, 2016 06:18 PM 
Large number modulo  FloorPlay  Number Theory  2  October 30th, 2013 08:59 PM 
Odds of Event Y, X number of times  andytx  Algebra  4  March 1st, 2012 12:53 AM 
What mean s 'negative number is five times bigger'?  W300  Algebra  2  October 22nd, 2009 09:11 AM 
Times of the number of champagne clinks at a party  steveeq1  Calculus  1  January 25th, 2009 12:56 PM 