1

Okay I've come up with a conjecture. First off, let $f(n)$ denote the sum of the digits of a positive integer $n$. I conjecture that for all positive integers $j$, we have that $$3|f(3^j).$$ I have checked $1\le j\le 33$ with Desmos, but I think there may be something wrong with my definition of $f(n)$ on desmos because desmos gives $f(3^{34})=98$ while wolfram gives $f(3^{34})=99$. But for $j\le33$, desmos confirms the conjecture.

To calculate with desmos I am using the following $$f(n)=\sum_{k=0}^{b(n)}\left\lfloor\frac{n}{10^k}\right\rfloor-10\left\lfloor\frac{n}{10^{k+1}}\right\rfloor,$$ with $$b(n)=\lceil\log_{10}n\rceil+\lfloor\exp(n-10^{\lceil\log_{10}n\rceil})\rfloor.$$ If I'm not mistaken, $b(n)$ gives the number of digits of $n$.

Desmos may just be having trouble dealing with numbers as large as $3^{34}$.

Anyway, I have no clue as to why $3|f(3^j)$, as I stumbled upon it accidentally. might anyone have some insight? Thanks!

Bill Dubuque
  • 272,048
clathratus
  • 17,161

1 Answers1

3

Let $n = a_m 10^m + \cdots + a_0$, a base $10$ representation of $n$. Then $n - f(n) = a_m (10^m -1) + \cdots a_1 (10-1)$. Since $ 10 ^ i - 1 = 9 ( 1 + 10 + \cdots 10^{i-1})$ we see that $3 \mid 10^i - 1$ for each $i \in \mathbb{N}$, we have $3 \mid n-f(n)$. If $3 \mid n $ then $3 \mid f(n)$ as well.

Infinity_hunter
  • 5,369
  • 1
  • 10
  • 30