login
A236534
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
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, 0, 0, 0, 356314, 543474, 0, 0, 0, 1423936, 1925120, 0, 0, 0, 0, 0, 0, 30626057, 629069477, 0, 0, 21939632, 0, 0, 0, 0, 0, 0, 0, 6596922386, 50997052437
OFFSET
1,3
COMMENTS
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.
LINKS
EXAMPLE
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.
MATHEMATICA
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]
CROSSREFS
Sequence in context: A325739 A181004 A051344 * A101856 A335520 A326291
KEYWORD
nonn
AUTHOR
Giovanni Resta, Jan 28 2014
STATUS
approved