A122194 Numbers that are the sum of exactly two sets of Fibonacci numbers.
3, 5, 6, 9, 10, 15, 17, 25, 28, 41, 46, 67, 75, 109, 122, 177, 198, 287, 321, 465, 520, 753, 842, 1219, 1363, 1973, 2206, 3193, 3570, 5167, 5777, 8361, 9348, 13529, 15126, 21891, 24475, 35421, 39602, 57313, 64078, 92735, 103681, 150049, 167760, 242785
Offset: 1
Examples
a(1)=3 as 3 is the sum of just 2 Fibonacci sets {3=Fibonacci(4)} and {1=Fibonacci(2), 2=Fibonacci(3)}; a(2)=5 as 5 is sum of Fibonacci sets {5} and {2,3} only.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- J. Berstel, An Exercise on Fibonacci Representations, RAIRO/Informatique Theorique, Vol. 35, No 6, 2001, pp. 491-498, in the issue dedicated to Aldo De Luca on the occasion of his 60th anniversary.
- M. Bicknell-Johnson & D. C. Fielder, The number of Representations of N Using Distinct Fibonacci Numbers, Counted by Recursive Formulas, Fibonacci Quart. 37.1 (1999) pp. 47 ff.
- Ron Knott Sumthing about Fibonacci Numbers
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,-1).
Programs
-
GAP
a:= function(n) if n mod 2=0 then return 2*Fibonacci(Int((n+6)/2)) -1; else return Lucas(1,-1, Int((n+5)/2))[2] -1; fi; end; List([1..50], n-> a(n) ); # G. C. Greubel, Jul 13 2019
-
Magma
f:=Floor; [(n mod 2) eq 0 select 2*Fibonacci(f((n+6)/2))-1 else Lucas(f((n+5)/2))-1: n in [1..50]]; // G. C. Greubel, Jul 13 2019
-
Maple
fib:= combinat[fibonacci]: lucas:=n->fib(n-1)+fib(n+1): a:=n -> if n mod 2 = 0 then 2 *fib(n/2+3) -1 else lucas((n+1)/2+2)-1 fi: seq(a(n), n=1..50);
-
Mathematica
LinearRecurrence[{1, 1, -1, 1, -1}, {3, 5, 6, 9, 10, 15}, 40] (* Vincenzo Librandi, Jul 25 2017 *) Table[If[Mod[n,2]==0, 2*Fibonacci[(n+6)/2]-1, LucasL[(n+5)/2]-1], {n,50}] (* G. C. Greubel, Jul 13 2019 *)
-
PARI
vector(50, n, f=fibonacci; if(n%2==0, 2*f((n+6)/2)-1, f((n+7)/2) + f((n+3)/2)-1)) \\ G. C. Greubel, Jul 13 2019
-
Sage
def a(n): if (mod(n,2)==0): return 2*fibonacci((n+6)/2) - 1 else: return lucas_number2((n+5)/2, 1,-1) -1 [a(n) for n in (1..50)] # G. C. Greubel, Jul 13 2019