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!)
A215024 Decimal equivalent of binary number in A215022. 8
0, 1, 4, 5, 18, 16, 17, 20, 21, 74, 72, 73, 66, 64, 65, 68, 69, 82, 80, 81, 84, 85, 298, 296, 297, 290, 288, 289, 292, 293, 266, 264, 265, 258, 256, 257, 260, 261, 274, 272, 273, 276, 277, 330, 328, 329, 322, 320, 321, 324, 325, 338, 336, 337, 340, 341, 1194 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
ind[n_] := Floor[Log[Abs[n]*Sqrt[5] + 1/2]/Log[GoldenRatio]]; f[1] = 1; f[n_] := If[n > 0, i = ind[n - 1]; If[EvenQ[i], i++]; i, i = ind[-n]; If[OddQ[i], i++]; i]; a[n_] := Module[{k = n, s = 0}, While[k != 0, i = f[k]; s += 2^(i - 1); k -= Fibonacci[-i]]; s]; Array[a, 100, 0] (* Amiram Eldar, Oct 15 2019 *)
PROG
(PARI) a(n)=if(n<2, return(n)); my(s=1, k=1, v); while(s<n, s+=fibonacci(k+=2)); v=binary(2^k/2); n-=fibonacci(k); forstep(i=k-2, 1, -1, if(abs(n-fibonacci(-i))<abs(n), n-=fibonacci(-i); v[#v+1-i]=1; i--)); subst(Pol(v), x, 2) \\ Charles R Greathouse IV, Aug 03 2012 [Caution: returns wrong values for some values of n > 15. Amiram Eldar, Oct 15 2019]
CROSSREFS
Sequence in context: A010361 A327683 A060289 * A066879 A276091 A258410
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Aug 03 2012
EXTENSIONS
Data corrected by Amiram Eldar, Oct 11 2019
STATUS
approved

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 April 26 07:58 EDT 2024. Contains 371991 sequences. (Running on oeis4.)