My Math Forum  

Go Back   My Math Forum > College Math Forum > Number Theory

Number Theory Number Theory Math Forum

Closed Thread
LinkBack Thread Tools Display Modes
February 4th, 2017, 07:22 PM   #1
Joined: Feb 2017

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 03:12 AM.
Vedprakash is offline  
February 6th, 2017, 04:01 AM   #2
Global Moderator
Joined: Dec 2006

Posts: 20,279
Thanks: 1963

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.
skipjack is online now  
Closed Thread

  My Math Forum > College Math Forum > Number Theory

appending, finding, modular arithmetic, modulo, number, times

Search tags for this page
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 07:18 PM
Large number modulo FloorPlay Number Theory 2 October 30th, 2013 09:59 PM
Odds of Event Y, X number of times andytx Algebra 4 March 1st, 2012 01:53 AM
What mean s 'negative number is five times bigger'? W300 Algebra 2 October 22nd, 2009 10:11 AM
Times of the number of champagne clinks at a party steveeq1 Calculus 1 January 25th, 2009 01:56 PM

Copyright © 2019 My Math Forum. All rights reserved.