%I #22 Apr 27 2018 09:21:55
%S 1,4,5,9,5,5,1,6,7,4,2,6,8,5,4,9,4,4,8,3,2,5,7,3,1,4,5,9,5,5,1,6,7,4,
%T 2,6,8,5,4,9,4,4,8,3,2,5,7,3,1,4,5,9,5,5,1,6,7,4,2,6,8,5,4,9,4,4,8,3,
%U 2,5,7,3,1,4,5,9,5,5,1,6,7,4,2,6,8,5,4,9,4,4,8,3,2,5,7,3,1,4,5
%N a(n+1) = sum of digits of (a(n) + a(n-1)).
%C This is also the digital root of A022378, Fibonacci starting with 2 and 32, beginning from the 20th term 2: [2, 5, 7, 3, 1, 4, 5, 9, 5, 5, 1, 6, 7, 4, 2, 6, 8, 5, 4, 9, 4, 4, 8, 3.] Like the digital root of A000045, sequence is period 24, and likewise, its period also adds up to 117._Peter M. Chema_, Apr 28 2016
%H <a href="/index/Rec#order_24">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
%F G.f.: (1+4*x+5*x^2+9*x^3+5*x^4+5*x^5+x^6+6*x^7+7*x^8+4*x^9+2*x^10+6*x^11+8*x^12+5*x^13+4*x^14+9*x^15+4*x^16+4*x^17+8*x^18+3*x^19+2*x^20+5*x^21+7*x^22+3*x^23)/(1-x^24). - _Robert Israel_, Apr 28 2016
%p A[0]:= 1: A[1]:= 4:
%p for i from 2 to 100 do
%p t:= A[i-2]+A[i-1];
%p A[i]:=(t + 9*(t mod 10))/10;
%p od:
%p seq(A[i],i=0..100); # _Robert Israel_, Apr 28 2016
%t a[0] = 1; a[1] = 4; a[n_] := a[n] = Total@ IntegerDigits[a[n - 1] + a[n - 2]]; Table[a@ n, {n, 0, 120}] (* _Michael De Vlieger_, Apr 28 2016 *)
%t nxt[{a_,b_}]:={b,Total[IntegerDigits[a+b]]}; NestList[nxt,{1,4},100][[All,1]] (* or *) PadRight[{},100,{1,4,5,9,5,5,1,6,7,4,2,6,8,5,4,9,4,4,8,3,2,5,7,3}] (* _Harvey P. Dale_, Apr 27 2018 *)
%o (PARI) a(n)=n=n%24;my(a=3,b=1);while(n,[a,b]=[b,sumdigits(a+b)]; n--);b \\ _Charles R Greathouse IV_, Apr 28 2016
%K nonn,base,easy
%O 0,2
%A _N. J. A. Sloane_.