cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A293315 The integer k that minimizes |k/2^n - r|, where r = golden ratio.

Original entry on oeis.org

2, 3, 6, 13, 26, 52, 104, 207, 414, 828, 1657, 3314, 6627, 13255, 26510, 53020, 106039, 212079, 424158, 848316, 1696632, 3393263, 6786526, 13573053, 27146106, 54292211, 108584423, 217168846, 434337692, 868675383, 1737350766, 3474701533, 6949403065
Offset: 0

Views

Author

Clark Kimberling, Oct 06 2017

Keywords

Crossrefs

Programs

  • Magma
    [Floor((2^n*(1+Sqrt(5))+1)/2): n in [0..33]]; // Vincenzo Librandi, Oct 08 2017
  • Maple
    A293315:=n->floor(1/2+2^n*(1+sqrt(5))/2): seq(A293315(n), n=0..40); # Wesley Ivan Hurt, Oct 06 2017
  • Mathematica
    z = 120; r = GoldenRatio;
    Table[Floor[r*2^n], {n, 0, z}];   (* A293313 *)
    Table[Ceiling[r*2^n], {n, 0, z}]; (* A293314 *)
    Table[Round[r*2^n], {n, 0, z}];   (* A293315 *)
  • PARI
    a(n) = (2^n*(1+sqrt(5))+1)\2; \\ Altug Alkan, Oct 06 2017
    

Formula

a(n) = floor(1/2 + r*2^n), where r = (1+sqrt(5))/2.
a(n) = A293313(n) if (fractional part of r*2^n) < 1/2, else a(n) = A293313(n).