Question 1061453
{{{d}}}= number of digits {{{N}}} has.
{{{7*10^d+N}}} = {{{N}}} with a {{{7}}} added as a first digit
{{{10N+7}}} = {{{N}}} with a {{{7}}} added as a last digit
The problem says that
{{{N+7*10^d=5(10N+7)}}}
{{{N+7*10^d=50N+35}}}
{{{7*10^d-35=50N-N}}}
{{{7(10^d-5)=49N}}}
{{{10^d-5=7N}}}
You could see what value of {{{d}}} makes {{{10^d-5}}}
a multiple of {{{7}}} ,
but I want easier calculations
{{{10^d=(7+3)^d=7^d+d*7^(d-1)*3+"...+d*7*3^d+3^d=7(7^(d-1)+d*3*7^(d-2)+"..."+3^(d-1))+3^d=7K+3^d}}} ,
so I am looking for how to make a multiple of {{{7}}} out of
{{{10^d-5=7K+3^d-5}}} ,
which means {{{3^d-5}}} being a multiple of 7.
{{{d<=4}}} does not work:
{{{3^2-5=9-5=4}}}
{{{3^3-5=27-5=22=21+1=7*3+1}}}
{{{3^4-5=81-5=76=70+6=7*10+6}}}
For {{{highlight(d=5)}}} ,
{{{3^5-5=243-5=238=7*34}}} ,
we find the first multiple of 7.