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.

A370731 a(n) is the least k >= 0 such that F(k) AND n = n (where F(k) denotes A000045(k), the k-th Fibonacci number and AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 1, 3, 4, 5, 5, 10, 10, 6, 7, 16, 16, 7, 7, 22, 22, 8, 8, 10, 10, 8, 8, 10, 10, 11, 11, 16, 16, 17, 17, 46, 46, 9, 10, 9, 10, 10, 10, 10, 10, 13, 13, 22, 22, 17, 17, 22, 22, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 64, 64, 17, 17, 94, 94, 11, 11, 15, 16, 19
Offset: 0

Views

Author

Rémy Sigrist, Feb 28 2024

Keywords

Comments

This sequence is well defined (see Comments in A370730).

Crossrefs

Programs

  • Mathematica
    A370731[n_] := Block[{k = -1}, While[BitAnd[Fibonacci[++k], n] != n]; k];
    Array[A370731, 100, 0] (* Paolo Xausa, Mar 01 2024 *)
  • PARI
    a(n) = { for (k = 0, oo, if (bitand(fibonacci(k), n)==n, return (k););); }

Formula

a(A000045(k)) = k for any k != 2.