A010074 a(n) = sum of base-7 digits of a(n-1) + sum of base-7 digits of a(n-2).
0, 1, 1, 2, 3, 5, 8, 7, 3, 4, 7, 5, 6, 11, 11, 10, 9, 7, 4, 5, 9, 8, 5, 7, 6, 7, 7, 2, 3, 5, 8, 7, 3, 4, 7, 5, 6, 11, 11, 10, 9, 7, 4, 5, 9, 8, 5, 7, 6, 7, 7, 2, 3, 5, 8, 7, 3, 4, 7, 5, 6, 11, 11, 10, 9, 7, 4, 5, 9, 8, 5, 7, 6, 7, 7
Offset: 0
Links
Crossrefs
Programs
-
Mathematica
nxt[{a_,b_}]:={b,Total[IntegerDigits[a,7]]+Total[IntegerDigits[b,7]]}; Transpose[NestList[nxt,{0,1},80]][[1]] (* Harvey P. Dale, Oct 12 2013 *)
Formula
Periodic from n=3 with period 24. - Franklin T. Adams-Watters, Mar 13 2006
From Hieronymus Fischer, Jun 27 2007: (Start)
a(n) = a(n-1)+a(n-2)-6*(floor(a(n-1)/7)+floor(a(n-2)/7)).
a(n) = floor(a(n-1)/7)+floor(a(n-2)/7)+(a(n-1)mod 7)+(a(n-2)mod 7).
a(n) = Fib(n)-6*sum{1A000045(n). (End)
Extensions
Incorrect comment removed by Michel Marcus, Apr 29 2018
Comments