login
Let f be a Fibonacci-like sequence seeded by f(1)=1, f(2)=k. a(n) is the smallest k > 0 such that f(n) is a square, or 0 if no such k exists.
2

%I #5 Jan 29 2014 12:34:20

%S 1,1,3,0,0,0,0,0,0,6,2,1,0,0,8,0,0,0,0,0,0,0,1630,5765,0,0,4328,0,0,0,

%T 0,0,0,356314,543474,0,0,0,1423936,1925120,0,0,0,0,0,0,30626057,

%U 629069477,0,0,21939632,0,0,0,0,0,0,0,6596922386,50997052437

%N Let f be a Fibonacci-like sequence seeded by f(1)=1, f(2)=k. a(n) is the smallest k > 0 such that f(n) is a square, or 0 if no such k exists.

%C Computing a(n) is equivalent to finding the smallest k, if any, that solves the Diophantine equation Fibonacci(n-1)*k + Fibonacci(n-2) = x^2.

%H Giovanni Resta, <a href="/A236534/b236534.txt">Table of n, a(n) for n = 1..375</a>

%e Letting f(1)=1, f(2)=6 gives f(10)=15^2. No smaller choice for f(2) makes f(10) a square, so a(10)=6.

%t a[1]=a[2]=1; a[3]=3; a[n_] := Block[{x, r = Fibonacci[n - 2], m = Fibonacci[n - 1]}, x = Quiet@ PowerMod[r, 1/2, m]; If[IntegerQ@x, (x^2 - r)/m, 0]]; Array[a, 60]

%Y Cf. A000045, A236506.

%K nonn

%O 1,3

%A _Giovanni Resta_, Jan 28 2014