The next number that has this property?
I noticed that $1/8 = 0.125$ and the sum of the digits of the number $0.125$ is $0+1+2+5=8$. It's lovely.
I searched other numbers who have that propriety : I only found $1$, $3$ and $8$.
Is there any other number $n$ as $n$ is equal to the sum of the digits of $1/n$ ?
Repeated digits are allowed to be counted only once.
Example : $1/3=0.\bar{3}$
EDIT : Yes, $0$ is not a solution, sorry. :)
A proof that finite decimal expansions do not work. According to The Penguin Dictionary of Curious and Interesting Numbers, p. 60, by Wells (Mathworld reference) $$\text{Length of decimal period}\left(\frac{1}{2^a5^b}\right)=\max(a,b)$$
Case 1: Assume $a\ge b$. We have that the sum of digits is no more than $9a$ .
By induction hypothesis if $2^a5^0>9a$ and $a>1$ $$2^{a+1}>18a=9(a+a)>9(a+1)$$ Since $2^65^0>9\times6$, $2^a5^b>9a$ follows for every $a\ge6$ and every nonnegative $b$.
Therefore if $a\ge b$ ,$a\ge6$
$$2^a5^b>\text{Sum of digits of decimal expansion}\left(\frac{1}{2^a5^b}\right)$$ Case 2: $a<b$.
By induction hypothesis if $5^b2^0>9b$ and $b>1$ $$5^{b+1}>45b=9(b+4b)>9(b+1)$$ Since $5^62^0>9\times6$, $2^a5^b>9b$ follows for every $b\ge6$ and every nonnegative $a$.
Therefore if $a<b$, $b\ge 6$
$$2^a5^b>\text{Sum of digits of decimal expansion}\left(\frac{1}{2^a5^b}\right)$$
So they are at most $5\times5=25$ cases to check for $1\le a,b \le 5$ that are easily done. We do not have those restrictions if the repetition is periodic, since the length of the period of $1/p$ is at most $p-1$, and obviously $p<9(p-1)$.
Code edit: Considering the starting digits too, and compiling with -O3 runs in 17 minutes to check the conjecture up to $100000$. The complexity is still about $O(n^2)$ to test an interval $[0-n]$(Because it takes about $O(k)$ to test if each $k$ meets the requirements). Reported values are $1$,$3$ and $8$.
#include <cstdio>
#include <ctime>
#include <map>
int main(){
clock_t t = clock();
printf("Testing 1-9999\n");
printf("1 is a solution!\n"); /*He is just a special kid, the fact that he has
no decimal digits doesn't make you better.They tell him he is the only one.*/
clock_t innert = clock();
for(int x=2;x<100000;++x){
if(x%10000==0){
printf ("It took me %f seconds.\n",((float)(clock()-innert))/CLOCKS_PER_SEC);
printf("Testing %d-%d\n",x,x+9999);
innert=clock();
}
std::map<int,int> residues;
int result=0,residue=1;
while((!residues.count(residue))&&residue){
residues[residue]=1;//dummy value
result+=(residue*10)/x;
residue=(residue*10)%x;
}
if(result==x)
printf("%d is a solution!\n",result);
}
t = clock() - t;;
printf ("Total: It took me %f seconds.\n",((float)t)/CLOCKS_PER_SEC);
return 0;
}
Counting repeating decimals once (and only considering the shortest such decimal expansion, i.e., $1/6=0.1\overline{6}$ is allowed, but not $0.1666\overline{6}$), I have checked values of $n\le 5000$ and found that only $1$, $3$, and $8$ are exact solutions. There are also a number of near misses, the largest of which is $1054$: its inverse has a large repeating block of digits (of length $240$), and it sums to $1053$.
If the restriction to the shortest decimal expansion is dropped, then there are many exact solutions (indeed, one might expect as many as $25\%$ of all natural numbers to work). For instance, $$\frac{1}{22}=0.0454\overline{54}.$$