A292568 a(n) = a(n-1) + sum of base-1000 digits of a(n-1), a(0)=1.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 1049, 1099, 1199, 1399, 1799, 2599, 3200, 3403, 3809, 4621, 5246, 5497, 5999, 7003, 7013, 7033, 7073, 7153, 7313, 7633, 8273, 8554, 9116, 9241, 9491, 9991, 10991, 11992, 12995, 14002, 14018, 14050, 14114, 14242, 14498
Offset: 0
Examples
a(16) = 2599 = 2 * 1000^1 + 599 * 1000^0. The sum of digits of a(17 - 1) = 2599 in base 1000 is therefore 2 + 599 = 601. a(17) = a(16) + the sum of digits of a(60) in base 1000 is therefore 2599 + 601 = 3200.
Programs
-
Mathematica
NestList[Total[IntegerDigits[#,1000]]+#&,1,50] (* Harvey P. Dale, Dec 12 2018 *)
-
PARI
a(n) = if (n==0, 1, prev = a(n-1); prev + sumdigits(prev, 1000)); \\ Michel Marcus, Sep 20 2017
Comments