OFFSET
1,2
COMMENTS
The sequence of digital roots of a(n) has period 6: 1, 2, 4, 8, 7, 5.
FORMULA
a(n) = concat(s1,s2,s3,...) where sj is the sum of the j-th set of three digits in the "cloned" digit string obtained by repeating each digit of a(n-1).
EXAMPLE
a(9) is obtained from a(8) = 614 by cloning every digit of 614 to get 6,6,1,1,4,4, summing the digits three at a time to get (6+6+1, 1+4+4) = (13, 9), and concatenating the sums to get a(9) = 139.
a(1) = 1, so a(2) = 1 + 1 + 0 = 2;
a(5) = 16, so a(6) = concat(1 + 1 + 6, 6 + 0 + 0) = 86;
a(6) = 86, so a(7) = concat(8 + 8 + 6, 6 + 0 + 0) = 226;
a(7) = 226, so a(8) = concat(2 + 2 + 2, 2 + 6 + 6) = 614;
a(8) = 614, so a(9) = concat(6 + 6 + 1, 1 + 4 + 4) = 139.
MATHEMATICA
NestList[FromDigits@ Flatten@ Map[IntegerDigits@ Total@ # &, Partition[PadRight[#, 3 Ceiling[Length@ #/3]], 3, 3]] &@ Riffle[#, #] &@ IntegerDigits@ # &, 1, 35] (* Michael De Vlieger, Mar 03 2017 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Medjber Mohamed Mounir, Mar 02 2017
STATUS
approved