OFFSET
0,3
COMMENTS
Note that "Sum of last three digits of n" takes the same values as this sequence for n <= 99 (but not for n = 100). "Sum of last three digits of n" repeats every 1000 terms, while this sequence repeats every 100 values. Analogs are obvious for "sum of the last 4 values of n" which repeats every 10^4 values. - Jonathan Vos Post, Mar 12 2012 [First sentence corrected by N. J. A. Sloane, Feb 12 2017]
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
EXAMPLE
99->9+9=18, 100->0+0=0.
PROG
(PARI) a(n)=n%100\10+n%10 \\ Charles R Greathouse IV, Mar 11 2012
(Python)
def A209685(n):
....if n<=9:return n
....return int(str(n)[-1])+int(str(n)[-2]) # Indranil Ghosh, Feb 12 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Mar 11 2012
STATUS
approved