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.

A216223 Distance from Fibonacci(n) to the next perfect square.

This page as a plain text file.
%I A216223 #17 Oct 27 2022 11:49:00
%S A216223 0,0,0,2,1,4,1,3,4,2,9,11,0,23,23,15,37,3,17,44,124,79,245,243,288,51,
%T A216223 408,718,285,1295,1529,1652,267,2306,4434,1979,144,9239,11840,4223,
%U A216223 19534,5283,29865,19604,46492,45551,67706,16008,92593,145155,102696,276775
%N A216223 Distance from Fibonacci(n) to the next perfect square.
%C A216223 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.
%C A216223 a(n) is a square for n = 0, 1, 2, 4, 5, 6, 8, 10, 12, 36.
%H A216223 Alois P. Heinz, <a href="/A216223/b216223.txt">Table of n, a(n) for n = 0..5000</a>
%F A216223 a(n) = floor(sqrt(Fibonacci(n))+1)^2-Fibonacci(n) if n<>1, 2, 12; else a(n)=0.
%e A216223 a(5) = 4 since Fibonacci(5)=5 that differs 4 to next square that is 9.
%p A216223 a:= n-> (f-> ceil(sqrt(f))^2-f)((<<0|1>, <1|1>>^n)[1, 2]):
%p A216223 seq(a(n), n=0..51);  # _Alois P. Heinz_, Oct 26 2022
%t A216223 Table[k = Ceiling[Sqrt[Fibonacci[n]]]; k^2 - Fibonacci[n], {n, 0, 60}] (* _T. D. Noe_, Mar 13 2013 *)
%Y A216223 Cf. A000045, A190993.
%K A216223 nonn
%O A216223 0,4
%A A216223 _Carmine Suriano_, Mar 13 2013