OFFSET
0,4
COMMENTS
Difference between y^2 and Fibonacci(n), y being next integer square root of Fibonacci(n). a(n)=0 only for n = 0, 1, 2, 12.
a(n) is a square for n = 0, 1, 2, 4, 5, 6, 8, 10, 12, 36.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
FORMULA
a(n) = floor(sqrt(Fibonacci(n))+1)^2-Fibonacci(n) if n<>1, 2, 12; else a(n)=0.
EXAMPLE
a(5) = 4 since Fibonacci(5)=5 that differs 4 to next square that is 9.
MAPLE
a:= n-> (f-> ceil(sqrt(f))^2-f)((<<0|1>, <1|1>>^n)[1, 2]):
seq(a(n), n=0..51); # Alois P. Heinz, Oct 26 2022
MATHEMATICA
Table[k = Ceiling[Sqrt[Fibonacci[n]]]; k^2 - Fibonacci[n], {n, 0, 60}] (* T. D. Noe, Mar 13 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Carmine Suriano, Mar 13 2013
STATUS
approved