A345347 Find the largest k with F(k) <= n, where F(k) is the k-th Fibonacci number. a(n) = F(k+2) + n.
1, 4, 7, 11, 12, 18, 19, 20, 29, 30, 31, 32, 33, 47, 48, 49, 50, 51, 52, 53, 54, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 199, 200, 201, 202, 203, 204
Offset: 0
Examples
The initial Fibonacci numbers are F(0)..F(5) = 0, 1, 1, 2, 3, 5. For n = 0, the largest k with F(k) <= 0 is k = 0, so F(k+2) = F(2) = 1, so a(0) = 1 + 0 = 1. For n = 1, the largest k with F(k) <= 1 is k = 2, so F(k+2) = F(4) = 3, so a(1) = 3 + 1 = 4. For n = 4, the largest k with F(k) <= 4 is k = 4, so F(k+2) = F(6) = 8, so a(4) = 8 + 4 = 12. In the paragraph that follows we use the Wythoff array-based definition from the start of the comments. Every positive integer appears once (only) in the Wythoff array. 0 is not positive, so does not appear in the array, so is not in the sequence. 1 is in the sequence by definition. 2 appears in Wythoff row 0, and 0 is not in the sequence, so 2 is not in the sequence. 4 appears in Wythoff row 1, and 1 is in the sequence, so 4 is in the sequence.
Links
- Encyclopedia of Mathematics, Zeckendorf representation.
- OEIS Wiki, Zeckendorf representation.
- N. J. A. Sloane, Classic Sequences.
Programs
-
Mathematica
kmax=12;Flatten[Table[Range[Fibonacci[k]+Fibonacci[k-2],Fibonacci[k+1]-1],{k,2,kmax}]] (* Paolo Xausa, Jan 02 2022 *) A108852[n_]:=1+Floor[Log[GoldenRatio,1+n*Sqrt[5]]]; nterms=100;Table[n+Fibonacci[1+A108852[n]],{n,0,nterms-1}](* Paolo Xausa, Jan 02 2022 *)
-
PARI
a(n) = my(k=0); while(fibonacci(k)<=n, k=k+1); n+fibonacci(k+1)
Comments