login
A101345
a(n) = Knuth's Fibonacci (or circle) product "2 o n".
7
5, 8, 13, 18, 21, 26, 29, 34, 39, 42, 47, 52, 55, 60, 63, 68, 73, 76, 81, 84, 89, 94, 97, 102, 107, 110, 115, 118, 123, 128, 131, 136, 141, 144, 149, 152, 157, 162, 165, 170, 173, 178, 183, 186, 191, 196, 199, 204, 207, 212, 217, 220, 225, 228, 233, 238, 241, 246
OFFSET
1,1
COMMENTS
Numbers whose Zeckendorf representation ends with 000. - Benoit Cloitre, Jan 11 2014
The asymptotic density of this sequence is sqrt(5)-2. - Amiram Eldar, Mar 21 2022
LINKS
Donald E. Knuth, Fibonacci multiplication, Appl. Math. Lett., Vol. 1, No. 1 (1988), pp. 57-60.
FORMULA
a(n) = floor(phi^3*(n+1)) - 3 - floor(2*phi*(n+1)) + 2*floor(phi*(n+1)) where phi = (1+sqrt(5))/2. - Benoit Cloitre, Jan 11 2014
a(n) = 2*A000201(n+1) + n - 2. See the comments in A101642. - Michel Dekking, Dec 23 2019
MATHEMATICA
zeck[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n * Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k-- ]; FromDigits[fr]]; kfp[n_, m_] := Block[{y = Reverse[ IntegerDigits[ zeck[ n]]], z = Reverse[ IntegerDigits[ zeck[ m]]]}, Sum[ y[[i]] * z[[j]] * Fibonacci[i + j + 2], {i, Length[y]}, {j, Length[z]}]];
Table[kfp[2, n], {n, 60}] (* Robert G. Wilson v, Feb 04 2005 *)
With[{r = Map[Fibonacci, Range[2, 14]]}, Rest[-1 + Position[#, _Integer][[All, 1]]] &@ Table[1/1000 * Total@ Map[FromDigits@ PadRight[{1}, Flatten@ #] &@ Reverse@ Position[r, #] &, Abs@ Differences@ NestWhileList[Function[k, k - SelectFirst[Reverse@ r, # < k &]], n + 1, # > 1 &]], {n, 0, 250}]] (* Michael De Vlieger, Jun 08 2017 *)
Array[2*Floor[(#+1)*GoldenRatio]+#-2 &, 100] (* Paolo Xausa, Mar 20 2024 *)
PROG
(Python)
from sympy import fibonacci
def a(n):
k=0
x=0
while n>0:
k=0
while fibonacci(k)<=n: k+=1
x+=10**(k - 3)
n-=fibonacci(k - 1)
return x
def ok(n): return 1 if str(a(n))[-3:]=="000" else 0 # Indranil Ghosh, Jun 08 2017
(Python)
from math import isqrt
def A101345(n): return (n+1+isqrt(5*(n+1)**2)&-2)+n-2 # Chai Wah Wu, Aug 29 2022
CROSSREFS
Second row of array in A101330.
Set-wise difference of A026274 - A035337.
Sequence in context: A314436 A314437 A314438 * A314439 A314440 A314441
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 26 2005
EXTENSIONS
More terms from David Applegate, Jan 26 2005
More terms from Robert G. Wilson v, Feb 04 2005
STATUS
approved