OFFSET
1,2
COMMENTS
a(n) = A000217(n) for n=1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 86, 89, ...; checked up to 10^7. - Michel Marcus, Sep 15 2015; checked up to 2^32 ~ 4*10^9. - Kenny Lau, Aug 01 2017
LINKS
Harry J. Smith, Table of n, a(n) for n=1..1000
EXAMPLE
a(12) = 78 as 1+2+3+4+5+6+7+8+9+R(10)+R(11)+R(12) = 1+2+3+4+5+6+7+8+9+01+11+21 = 78.
MATHEMATICA
Accumulate[Table[FromDigits[Reverse[IntegerDigits[n]]], {n, 1, 120}]] (* Enrique PĂ©rez Herrero, Jun 01 2013 *)
Accumulate[IntegerReverse[Range[60]]] (* Harvey P. Dale, Dec 25 2021 *)
PROG
(PARI) { a=0; for (n=1, 1000, x=n; r=0; while (x>0, d=x-10*(x\10); x\=10; r=r*10 + d); write("b062918.txt", n, " ", a+=r) ) } \\ Harry J. Smith, Aug 12 2009
(PARI) a(n) = sum(k=1, n, eval(concat(Vecrev(Str(k))))); \\ Michel Marcus, Sep 15 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jul 02 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jul 05 2001
STATUS
approved