smallest n digit number which is multiple of 7Finding the smallest baseA big “smallest” numberWhat's the smallest number with first digit 1 that triples when this digit is moved to the end?Find the smallest natural number $n$Determine the smallest prime which does not divide any five digit number…Smallest multiple containing only 1's and 0'sSmallest number starting with N divisble by every non zero digit of NBy which convention 04 (for example) is no valid 2 digit number?What is the smallest number $n>2$ of this kind?What's the smallest three digit number that satisfies the following system of congruences?
What does this wavy downward arrow preceding a piano chord mean?
Causes of bimodal distributions when bootstrapping a meta-analysis model
Decoupling cap routing on a 4 layer PCB
Can there be a single technologically advanced nation, in a continent full of non-technologically advanced nations?
60s/70s science fiction novel where a man (after years of trying) finally succeeds to make a coin levitate by sheer concentration
How can I get people to remember my character's gender?
Adding command shortcuts to bin
How to adjust tikz picture so it fits to current size of a table cell?
Why does this derived table improve performance?
How do inspiraling black holes get closer?
Has a commercial or military jet bi-plane ever been manufactured?
Introducing Gladys, an intrepid globetrotter
Are pressure-treated posts that have been submerged for a few days ruined?
Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?
Would glacier 'trees' be plausible?
How I can I roll a number of non-digital dice to get a random number between 1 and 150?
Out of scope work duties and resignation
Why wasn't the Night King naked in S08E03?
Why aren't nationalizations in Russia described as socialist?
What is a smasher?
Pressure inside an infinite ocean?
How long would it take for people to notice a mass disappearance?
Does it make sense for a function to return a rvalue reference
In Stroustrup's example, what does this colon mean in `return 1 : 2`? It's not a label or ternary operator
smallest n digit number which is multiple of 7
Finding the smallest baseA big “smallest” numberWhat's the smallest number with first digit 1 that triples when this digit is moved to the end?Find the smallest natural number $n$Determine the smallest prime which does not divide any five digit number…Smallest multiple containing only 1's and 0'sSmallest number starting with N divisble by every non zero digit of NBy which convention 04 (for example) is no valid 2 digit number?What is the smallest number $n>2$ of this kind?What's the smallest three digit number that satisfies the following system of congruences?
$begingroup$
I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?
sequences-and-series elementary-number-theory
$endgroup$
add a comment |
$begingroup$
I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?
sequences-and-series elementary-number-theory
$endgroup$
1
$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13
$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14
$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16
add a comment |
$begingroup$
I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?
sequences-and-series elementary-number-theory
$endgroup$
I want to find the smallest n digit number which is a multiple of $7$. For example, when $n=1$ then $7$ is the answer, if $n=2$ then $14$ is the answer, if $n=3$ then $105$ is the answer. What will be the answer for $n$th term?
sequences-and-series elementary-number-theory
sequences-and-series elementary-number-theory
edited Apr 29 at 15:48
tarit goswami
2,5291522
2,5291522
asked Apr 29 at 15:10
sr123sr123
374
374
1
$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13
$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14
$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16
add a comment |
1
$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13
$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14
$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16
1
1
$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13
$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13
$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14
$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14
$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16
$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$
Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
$$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$
$endgroup$
add a comment |
$begingroup$
Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.
For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.
$endgroup$
add a comment |
$begingroup$
Solve
$$(10^n+c)bmod 7=0$$ for the smallest positive $c$.
You have
$$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$
so that $$c=7-10^nbmod 7.$$
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3207020%2fsmallest-n-digit-number-which-is-multiple-of-7%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$
Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
$$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$
$endgroup$
add a comment |
$begingroup$
The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$
Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
$$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$
$endgroup$
add a comment |
$begingroup$
The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$
Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
$$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$
$endgroup$
The $n$ th term of the sequence will be $$10^n-1+big(7-(10^n-1pmod7)big)$$
Because to get a $n$ digit number you will need at least $10^n-1$, now suppose the number is of the form $10^n-1+k$ for some natural $k$, for divisibility we need $(10^n-1+k)equiv 0 pmod7$ and to satisfy the minimality condition we need $kin [0,6].$ And $7-10^n-1pmod7in [0,6]$, hence the result:
$$a_n=10^n-1+big(7-(10^n-1pmod7)big)$$
edited Apr 29 at 15:36
answered Apr 29 at 15:20
tarit goswamitarit goswami
2,5291522
2,5291522
add a comment |
add a comment |
$begingroup$
Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.
For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.
$endgroup$
add a comment |
$begingroup$
Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.
For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.
$endgroup$
add a comment |
$begingroup$
Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.
For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.
$endgroup$
Hint The function $k mapsto m leftlceil frackm rightrceil$ maps $k$ to the smallest integer multiple of $m$ at least as large as $k$.
For an integer $n > 0$ the smallest $n$-digit number is $10^n - 1$, so the the smallest $n$-digit number that is a multiple of $7$ is $$7leftlceilfrac10^n - 17rightrceil.$$ The sequence begins $$7, 14, 105, 1001, 10003, ldots .$$ Since $10^n - 1 equiv 3^n - 1 pmod 7$ and $3$ has order $6$ in $Bbb Z_7^times$, (except for the first term, $7$) the smallest $n$-digit number that is a multiple of $7$ is $10^n - 1 + r(n)$, where $r(n)$ depends only on the value of $n pmod 6$, i.e., the trailing digits $4, 5, 1, 3, ldots$ repeat every six terms.
edited Apr 29 at 16:36
answered Apr 29 at 15:22
TravisTravis
65.1k769152
65.1k769152
add a comment |
add a comment |
$begingroup$
Solve
$$(10^n+c)bmod 7=0$$ for the smallest positive $c$.
You have
$$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$
so that $$c=7-10^nbmod 7.$$
$endgroup$
add a comment |
$begingroup$
Solve
$$(10^n+c)bmod 7=0$$ for the smallest positive $c$.
You have
$$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$
so that $$c=7-10^nbmod 7.$$
$endgroup$
add a comment |
$begingroup$
Solve
$$(10^n+c)bmod 7=0$$ for the smallest positive $c$.
You have
$$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$
so that $$c=7-10^nbmod 7.$$
$endgroup$
Solve
$$(10^n+c)bmod 7=0$$ for the smallest positive $c$.
You have
$$(10^n+c)bmod7=(10^nbmod 7+cbmod 7)bmod 7=0$$
so that $$c=7-10^nbmod 7.$$
edited Apr 29 at 15:27
answered Apr 29 at 15:22
Yves DaoustYves Daoust
135k676233
135k676233
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3207020%2fsmallest-n-digit-number-which-is-multiple-of-7%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Are you familiar with modular arithmetic?
$endgroup$
– Arthur
Apr 29 at 15:13
$begingroup$
yes i am familiar.
$endgroup$
– sr123
Apr 29 at 15:14
$begingroup$
$!bmod 7!:, 10^large n-1!+k,equiv, 0iff k,equiv,ldots $
$endgroup$
– Bill Dubuque
Apr 29 at 15:16