OFFSET
1,2
EXAMPLE
a(15-1) = 4; 15 in base 4 is 33; 3+3 = 6, so a(15) = 6.
MATHEMATICA
$RecursionLimit=100
a[1]=1;
a[n_]:=If[a[n-1]!=1, Total[IntegerDigits[n, a[n-1]]], n]
Array[a, 100]
PROG
(PARI) lista(nn) = {print1(a = 1, ", "); for (n=2, nn, if (a==1, a = n, a = vecsum(digits(n, a)); ); print1(a, ", "); ); } \\ Michel Marcus, Oct 21 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Cody M. Haderlie, Oct 17 2016
STATUS
approved