login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030139 a(n+1) = sum of digits of (a(n) + a(n-1)). 0

%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_.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)