0

Here :

Are there prime numbers $C(n)$ or $RC(n)$?

I defined the "crazy-numbers" and the "reversed-crazy-numbers". The number of digits of $C(n)$ is the same as the number of digits of $RC(n)$.

But how many digits does $C(n)$ have ? Is there a general formula ?

For $1\le n\le 9$, $C(n)$ has $$\frac{n(n+1)}{2}=\binom{n+1}{2}$$ digits. This is easy because the number of digits is just $1+\cdots+n$

For $10\le n\le 99$, $C(n)$ has $$n(n+1)-45$$ digits. This time the number of digits is $45$ (number of digits of $C(9)$) plus $2(10+\cdots+n)$, so we have $n(n+1)-9\cdot 10+45=n(n+1)-45$

For $100\le n\le 999$ , $C(n)$ has $$9855+3\cdot(100+\cdots +n)$$

digits. A pattern apparantly emerges , but I have no idea how I can find a universal formula for every $n$, if there actually is one.

Aryabhata
  • 82,206
Peter
  • 84,454
  • 1
    what are the sums of digits like ? –  Aug 01 '17 at 22:53
  • For $1\le n\le 9$, the digit sum is $$1+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$$ No idea, whether we have a pattern for larger $n$ – Peter Aug 01 '17 at 23:07
  • well that may tell you when they divide by 3 etc. ( and all primes above 3 are of one of two remainders when dividing by 6. –  Aug 01 '17 at 23:12

1 Answers1

0

I finally figured out a formula : If $s$ is the number of digits of $n$, the number $c(n)$ has $$\frac{99n(n+1)s-(10^s-10)(10^s-1)}{198}$$ digits. With the help of mathworld I determined the formula $$c(10^n-1)=\frac{(10^n-1)(99\cdot 10^nn-10^n+10)}{198}$$ and the rest was relatively easy.

Peter
  • 84,454