login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101345 a(n) = Knuth's Fibonacci (or circle) product "2 o n". 6

%I #41 Mar 20 2024 07:53:14

%S 5,8,13,18,21,26,29,34,39,42,47,52,55,60,63,68,73,76,81,84,89,94,97,

%T 102,107,110,115,118,123,128,131,136,141,144,149,152,157,162,165,170,

%U 173,178,183,186,191,196,199,204,207,212,217,220,225,228,233,238,241,246

%N a(n) = Knuth's Fibonacci (or circle) product "2 o n".

%C Numbers whose Zeckendorf representation ends with 000. - _Benoit Cloitre_, Jan 11 2014

%C The asymptotic density of this sequence is sqrt(5)-2. - _Amiram Eldar_, Mar 21 2022

%H Amiram Eldar, <a href="/A101345/b101345.txt">Table of n, a(n) for n = 1..10000</a>

%H Donald E. Knuth, <a href="http://dx.doi.org/10.1016/0893-9659(88)90176-0">Fibonacci multiplication</a>, Appl. Math. Lett., Vol. 1, No. 1 (1988), pp. 57-60.

%F 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

%F a(n) = 2*A000201(n+1) + n - 2. See the comments in A101642. - _Michel Dekking_, Dec 23 2019

%t 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]}]];

%t Table[kfp[2, n], {n, 60}] (* _Robert G. Wilson v_, Feb 04 2005 *)

%t 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 *)

%t Array[2*Floor[(#+1)*GoldenRatio]+#-2 &, 100] (* _Paolo Xausa_, Mar 20 2024 *)

%o (Python)

%o from sympy import fibonacci

%o def a(n):

%o k=0

%o x=0

%o while n>0:

%o k=0

%o while fibonacci(k)<=n: k+=1

%o x+=10**(k - 3)

%o n-=fibonacci(k - 1)

%o return x

%o def ok(n): return 1 if str(a(n))[-3:]=="000" else 0 # _Indranil Ghosh_, Jun 08 2017

%o (Python)

%o from math import isqrt

%o def A101345(n): return (n+1+isqrt(5*(n+1)**2)&-2)+n-2 # _Chai Wah Wu_, Aug 29 2022

%Y Second row of array in A101330.

%Y Cf. A000201, A014417, A101642, A095085.

%Y Set-wise difference of A026274 - A035337.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Jan 26 2005

%E More terms from _David Applegate_, Jan 26 2005

%E More terms from _Robert G. Wilson v_, Feb 04 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 11 16:36 EDT 2024. Contains 372409 sequences. (Running on oeis4.)