OFFSET
1,1
COMMENTS
When the remainder is zero, this 0 is still concatenated to the result (12/3 becomes 40).
All terms of A052224 are fixed points; more generally, if n has digital sum 10^k for some k > 0 and the remainder of n when divided by 10^k has k decimal digits, then n is a fixed point (corrected by Rémy Sigrist, Jul 10 2018).
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..20000
FORMULA
a(10^k) = 10^(k+1) for any k >= 0. - Rémy Sigrist, Jul 10 2018
EXAMPLE
1 divided by 1 is 1 with the remainder 0, thus a(1) = 10;
2 divided by 2 is 1 with the remainder 0, thus a(2) = 10;
3 divided by 3 is 1 with the remainder 0, thus a(3) = 10;
4 divided by 4 is 1 with the remainder 0, thus a(4) = 10;
...
10 divided by (1+0) is 10 with the remainder 0, thus a(10) = 100;
11 divided by (1+1) is 5 with the remainder 1, thus a(11) = 51;
12 divided by (1+2) is 4 with the remainder 0, thus a(12) = 40;
13 divided by (1+3) is 3 with the remainder 1, thus a(13) = 31;
...
2018 divided by (2+0+1+8) is 183 with the remainder 5, thus a(2018) = 1835.
Etc.
MATHEMATICA
Array[FromDigits@ Flatten[IntegerDigits@ # & /@ QuotientRemainder[#, Total[IntegerDigits@ #]]] &, 71] (* Michael De Vlieger, Jul 10 2018 *)
PROG
(PARI) a(n, base=10) = my (ds=sumdigits(n, base), q=n\ds, r=n%ds); q * base^max(1, #digits(r, base)) + r \\ Rémy Sigrist, Jul 10 2018
CROSSREFS
KEYWORD
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Jul 09 2018
STATUS
approved