A357756 a(n) is the least k > 0 such that A007953(n*k) equals A007953((n*k)^2), where A007953 is the sum of the digits.
1, 1, 5, 3, 25, 2, 3, 27, 62, 1, 1, 5, 15, 27, 128, 3, 31, 17, 1, 1, 5, 9, 9, 2, 75, 4, 18, 7, 64, 5, 3, 16, 56, 3, 85, 17, 5, 27, 5, 9, 25, 9, 45, 13, 27, 1, 1, 27, 66, 54, 2, 9, 9, 18, 22, 1, 32, 15, 25, 135, 3, 18, 8, 3, 28, 9, 3, 43, 47, 72, 27, 8, 25, 126, 27
Offset: 0
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.
Programs
-
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
-
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
Comments