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.

A293321 The integer k that minimizes |k/2^n - tau^2|, where tau = (1+sqrt(5))/2 = golden ratio.

Original entry on oeis.org

3, 5, 10, 21, 42, 84, 168, 335, 670, 1340, 2681, 5362, 10723, 21447, 42894, 85788, 171575, 343151, 686302, 1372604, 2745208, 5490415, 10980830, 21961661, 43923322, 87846643, 175693287, 351386574, 702773148, 1405546295, 2811092590, 5622185181, 11244370361
Offset: 0

Views

Author

Clark Kimberling, Oct 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    z = 120; r = 1+GoldenRatio;
    Table[Floor[r*2^n], {n, 0, z}];   (* A293319 *)
    Table[Ceiling[r*2^n], {n, 0, z}]; (* A293320 *)
    Table[Round[r*2^n], {n, 0, z}]; (* A293321 *)
  • PARI
    a(n) = (2^n*(3+sqrt(5))+1)\2; \\ Altug Alkan, Oct 08 2017

Formula

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