login
a(n) = n^2 - [largest Fibonacci number <= n^2].
1

%I #16 Feb 05 2019 13:05:55

%S 0,1,1,3,4,2,15,9,26,11,32,0,25,52,81,23,56,91,128,23,64,107,152,199,

%T 15,66,119,174,231,290,351,37,102,169,238,309,382,457,534,3,84,167,

%U 252,339,428,519,612,707,804,903,17,120,225,332,441,552,665,780,897,1016,1137

%N a(n) = n^2 - [largest Fibonacci number <= n^2].

%C The only numbers n where a(n)=0 are 1 and 12: a(1) = 1*1 - 1 = 0 and a(12) = 12*12 - 144 = 0. Cohn (1964) proved that 1 and 144 are the only Fibonacci numbers which are perfect squares. In general, for a positive integer k, how many Fibonacci numbers exist such that k = n^2 - (largest Fibonacci number <= n^2)? The only proved answer is 2 for k=0.

%H Vincenzo Librandi, <a href="/A166074/b166074.txt">Table of n, a(n) for n = 1..5000</a>

%H J. H. E. Cohn, <a href="http://math.la.asu.edu/~checkman/SquareFibonacci.html">On square Fibonacci numbers</a>, Journal London Math.Soc., 39 (1964), pp. 537-540.

%t a[n_]:=Block[{k=1}, While[Fibonacci[k]<=n^2, k++]; Return[n^2 - Fibonacci[k - 1]]]; Table[a[n], {n, 80}] (* _Vincenzo Librandi_, Jan 09 2019 *)

%t With[{fibs=Fibonacci[Range[40]]},Table[n^2-Select[Nearest[fibs,n^2,2],#<= n^2&],{n,70}]][[All,1]] (* _Harvey P. Dale_, Feb 05 2019 *)

%Y Cf. A000045.

%K easy,nonn

%O 1,4

%A _Ctibor O. Zizka_, Oct 06 2009

%E a(7) corrected and more terms appended by _R. J. Mathar_, Oct 08 2009