A130633 Additive persistence of Fibonacci numbers.
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 2
Offset: 0
Examples
3524578 -> 3+5+2+4+5+7+8 = 34 -> 3+4 = 7 -> persistence = 2.
Programs
-
Maple
with(numtheory): with(combinat): P:=proc(n) local a,t; t:=0; a:=fibonacci(n); while a>9 do t:=t+1; a:=convert(convert(a,base,10),`+`); od; t; end: seq(P(i),i=0..10^2);
-
Mathematica
Table[Length[NestWhileList[Plus@@IntegerDigits[#]&, Fibonacci[n], #>=10&]], {n, 0, 86}]-1 (* James C. McMahon, Feb 11 2025 *)
-
PARI
ap(n)=my(s); while(n>9, n=sumdigits(n); s++); s a(n)=ap(fibonacci(n)) \\ Charles R Greathouse IV, Feb 12 2025
Formula
Extensions
Corrected entries and changed Maple code by Paolo P. Lava, Dec 19 2017
Comments