A274695 a(1) = 1; for n>1, a(n) = smallest number > a(n-1) such that a(1)*a(2)*...*a(n) + 1 is a Fibonacci number.
1, 2, 6, 133, 97479304649455554938377
Offset: 1
Keywords
Examples
After a(1)=1 and a(2)=2, we want m, the smallest number > 2 such that 1*2*m+1 is a Fibonacci number: this is m = 6 = a(3).
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = Block[{p = Times @@ Array[a, n-1], i, m}, For[i=2, ! (IntegerQ[m = (Fibonacci[i] - 1)/p] && m > a[n-1]), i++]; m]; Array[a, 6] (* Giovanni Resta, Jul 05 2016 *)
-
Sage
product = 1 seq = [ product ] prev_fib_index = 0 max_n = 5 for n in range(2, max_n+1): fib_index = prev_fib_index + 1 found = False while not found: fib_minus_1 = fibonacci(fib_index) - 1 if product.divides(fib_minus_1): m = int( fib_minus_1 / product ) if m > seq[-1]: product = product * m seq.append( m ) found = True prev_fib_index = fib_index break fib_index += 1 print(seq)
Extensions
a(5) from Giovanni Resta, Jul 05 2016
Comments