A280185 a(n) = n - A004090(n), where A004090 is the sum of digits of the Fibonacci numbers A000045.
0, 0, 1, 1, 1, 0, -2, 3, 5, 2, 0, -6, 3, 5, -3, 8, -8, -5, -1, 5, -4, 1, 5, -5, -3, 6, 7, -2, 7, 6, 13, 0, 2, -1, -3, 0, 9, 2, -6, -4, 16, 10, -4, 2, 11, 16, 11, 10, -6, -6, 4, 22, 4, 12, 1, -3, 8, 5, -15, 15, 6, 8, 0, 2, 13, -2, -7, 8, 17, 4, 8, 25, 0, 9, -8, 10, 10, -9, -2, 21, -4, 2, 18, -15, 12, -4, 6, -10, 19, -5, 17, 23, 14, 28, 5, 4, 6, -3, 16, -2
Offset: 0
Examples
a(2) = a(3) = 1 because A000045(2) = 1 = A004090(2), its digital sum, A000045(3) = 2 = A004090(3), and 2 - 1 = 3 - 2 = 1.
Links
- M. F. Hasler, Table of n, a(n) for n = 0..100000
Crossrefs
Programs
-
Mathematica
Table[n - Total@ IntegerDigits@ Fibonacci@ n, {n, 0, 99}] (* Michael De Vlieger, Dec 28 2016 *)
-
PARI
A280185(n)=n-sumdigits(fibonacci(n)) /* To produce the b-file; can be used for searches or similar purpose, this is faster than to compute fib(n) anew for each term. */ b=-a=1;for(n=0,1e5,write("/tmp/A280185.txt",n" ",n-sumdigits(a=b+b=a)))
Comments