cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A130633 Additive persistence of Fibonacci numbers.

Original entry on oeis.org

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

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Jun 19 2007, corrected Jun 22 2007

Keywords

Comments

Up to 10000 the maximum value is 4.
Up to 10^22 the maximum value is 4. Conjecture: for n > 15, a(n) > 1. I checked the conjecture up to 10^10. - Charles R Greathouse IV, Feb 12 2025

Examples

			3524578 -> 3+5+2+4+5+7+8 = 34 -> 3+4 = 7 -> persistence = 2.
		

Crossrefs

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

a(n) = A031286(A000045(n)). - Michel Marcus, Feb 12 2025

Extensions

Corrected entries and changed Maple code by Paolo P. Lava, Dec 19 2017