# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a309416 Showing 1-1 of 1 %I A309416 #18 Jul 31 2019 07:27:22 %S A309416 0,0,0,0,1,0,1,1,0,1,2,2,1,0,1,2,3,5,3,2,1,0,1,2,3,5,5,7,7,5,5,3,2,1, %T A309416 0,1,2,3,5,5,7,8,8,10,12,12,10,8,8,7,5,5,3,2,1,0,1,2,3,5,5,7,8,8,10, %U A309416 12,13,13,13,15,17,19,22,19,17,15,13,13,13,12 %N A309416 a(n) = Sum_{k > 0} d^k(n), where d^k corresponds to the k-th iterate of A296239. %C A309416 Iterating A296239 from any nonnegative number always leads to the fixed point 0, hence the series in the name has only finitely many nonzero terms and is well defined. %H A309416 Rémy Sigrist, Table of n, a(n) for n = 0..10946 %F A309416 a(n) = 0 iff n is a Fibonacci number. %e A309416 For n = 1024: %e A309416 - A296239(1024) = 37, %e A309416 - A296239(37) = 3, %e A309416 - A296239(3) = 0, %e A309416 - hence a(1024) = 37 + 3 = 40. %o A309416 (PARI) A296239(n) = for (i=1, oo, if (n<=fibonacci(i), return (min(n-fibonacci(i-1), fibonacci(i)-n)))) %o A309416 a(n) = my (v=0); while (n=A296239(n), v+=n); return (v) %Y A309416 Cf. A000045, A296239. %K A309416 nonn %O A309416 0,11 %A A309416 _Rémy Sigrist_, Jul 30 2019 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE