OFFSET
0,3
COMMENTS
A task in the German competition "Bundeswettbewerb Mathematik 2021" was to prove that for each positive integer n there exists a k such that A007953(n*k) = A007953((n*k)^2).
One of the proposed proofs uses the argument that numbers of the form m = (10^x-1)*(10^y) will have the desired property A007953(m) = A007953(m^2). Thus we need to prove that we can find for all n a k, x and y such that n*k = (10^x-1)*(10^y). Let n be of the form b*2^c*5^d with b odd and not divisible by 5, then we know that y = max(c, d). From Euler's totient theorem we know that 10^x-1 will be divisible by e if x = A000010(e) where A000010 is Euler's totient function. See the formula section for the corresponding resulting k.
a(n) will never be divisible by 10.
If n is divisible by 3 but not by 9, then a(n) is divisible by 3. - Robert Israel, Oct 13 2022
LINKS
Johann Beurich, Wie kann man das beweisen? (Bundeswettbewerb Mathematik 2021), YouTube video, 2021 (in German).
Bundeswettbewerb Mathematik 2021, Die Aufgaben_und_Loesungen der 2. Runde 2021 (in German). The proof and solutions.
FORMULA
MAPLE
f:= proc(n) local k;
for k from 1 do if sd(n*k) = sd((n*k)^2) then return k fi od
end proc:
map(f, [$1..100]); # Robert Israel, Oct 13 2022
PROG
(PARI) a(n) = {my(k = 1); while(sumdigits(n*k)!=sumdigits((n*k)^2), k++); k}
(Python)
def sd(n): return sum(map(int, str(n)))
def a(n):
k = 1
while not sd(n*k) == sd((n*k)**2): k += 1
return k
print([a(n) for n in range(75)]) # Michael S. Branicky, Oct 13 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Thomas Scheuerle, Oct 12 2022
STATUS
approved