OFFSET
0,4
COMMENTS
The digital sum analog (in base 3) of the Fibonacci recurrence.
When starting from index n=3, periodic with Pisano period A001175(2)=3.
a(n) and Fib(n)=A000045(n) are congruent modulo 2 which implies that (a(n) mod 2) is equal to (Fib(n) mod 2)=A011655(n). Thus (a(n) mod 2) is periodic with the Pisano period A001175(2)=3 too.
For general bases p>2, we have the inequality 2<=a(n)<=2p-3 (for n>2). Actually, a(n)<=3=A131319(3) for the base p=3.
LINKS
FORMULA
EXAMPLE
a(5)=3, since a(3)=2, ds_3(2)=2, a(4)=3=10(base 3),
ds_3(3)=1 and so a(5)=2+1.
MATHEMATICA
nxt[{a_, b_}]:={b, Total[IntegerDigits[a, 3]]+Total[IntegerDigits[b, 3]]}; Transpose[NestList[nxt, {0, 1}, 100]][[1]] (* Harvey P. Dale, Aug 02 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hieronymus Fischer, Jun 27 2007
EXTENSIONS
Incorrect comment removed by Michel Marcus, Apr 29 2018
STATUS
approved