MathDB
Wierd but nice functional.

Source: Iranian Third Round 2020 Number Theory exam Problem3

November 21, 2020
number theoryfunctionsum of digits

Problem Statement

Find all functions ff from positive integers to themselves, such that the followings hold. 1)1).for each positive integer nn we have f(n)<f(n+1)<f(n)+2020f(n)<f(n+1)<f(n)+2020. 2)2).for each positive integer nn we have S(f(n))=f(S(n))S(f(n))=f(S(n)) where S(n)S(n) is the sum of digits of nn in base 1010 representation.