A028841 Iterated sum of digits of n is a Fibonacci number.
1, 2, 3, 5, 8, 10, 11, 12, 14, 17, 19, 20, 21, 23, 26, 28, 29, 30, 32, 35, 37, 38, 39, 41, 44, 46, 47, 48, 50, 53, 55, 56, 57, 59, 62, 64, 65, 66, 68, 71, 73, 74, 75, 77, 80, 82, 83, 84, 86, 89, 91, 92, 93, 95, 98, 100, 101, 102, 104, 107, 109, 110, 111, 113, 116, 118, 119
Offset: 1
Examples
98 -> 9 + 8 = 17 -> 1 + 7 = 8 is a Fibonacci number.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1001 [Offset adapted by _Georg Fischer_, Feb 28 2020]
Programs
-
Mathematica
With[{fibo = {1, 2, 3, 5, 8}}, Select[Range[120], MemberQ[fibo, NestWhile[Total[IntegerDigits[#]] &, #, # > 9 &]]&]] (* Harvey P. Dale, Apr 11 2013 *)
-
Scala
def fiboDRQ(n: Int): Boolean = List(1, 2, 3, 5, 8).contains(n % 9) (1 to 100).filter(fiboDRQ) // Alonso del Arte, Jan 28 2020
Formula
Conjectures from Colin Barker, Feb 18 2020: (Start)
G.f.: x*(1 + x + x^2 + 2*x^3 + 3*x^4 + x^5) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6) for n>6.
(End)
Extensions
More terms from Patrick De Geest, Jun 15 1999
Offset corrected to 1 by Alonso del Arte, Jan 28 2020 at Michel Marcus's suggestion
Comments