OFFSET
0,3
COMMENTS
This sequence is well defined:
- for any n >= 0, let w be such that n < 2^(w+1),
- the Fibonacci sequence mod 2^(w+1) is (3*2^w)-periodic,
- let p = 3*2^w,
- in other words, the binary expansion of A000045(p-2) ends with w+1 1's,
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..3800
FORMULA
MATHEMATICA
A370730[n_] := Block[{k = -1}, While[BitAnd[Fibonacci[++k], n] != n]; Fibonacci[k]]; Array[A370730, 100, 0] (* Paolo Xausa, Mar 01 2024 *)
PROG
(PARI) a(n) = { for (k = 0, oo, my (f = fibonacci(k)); if (bitand(f, n)==n, return (f); ); ); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 28 2024
STATUS
approved