A272712 Perfect powers that are the difference of two nonnegative Fibonacci numbers.
1, 4, 8, 16, 32, 81, 144, 225, 343, 576
Offset: 1
Examples
32 is a term because 32 = 2^5 = 34 - 2 = Fibonacci(9) - Fibonacci(3).
Programs
-
Maple
isA272712 := proc(n) isA001597(n) and isA007298(n) ; #uses code in A001597 and A007298 end proc: for n from 1 do if isA272712(n) then printf("%d\n",n) ; end if; end do: # R. J. Mathar, May 25 2016
-
Mathematica
isA001597[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; isA007298[n_] := Module[{i, Fi, j, Fj}, For[i = 0, True, i++, Fi = Fibonacci[i]; For[j = i, True, j++, Fj = Fibonacci[j]; Which[Fj - Fi == n, Return@True, Fj - Fi > n, Break[]]]; Fj := Fibonacci[i + 1]; If[Fj - Fi > n, Return@False]]]; Select[Range[1000], isA001597[#] && isA007298[#]&] (* Jean-François Alcover, Nov 16 2023, after R. J. Mathar in A007298 *)
Comments