A370730 a(n) is the least Fibonacci number f such that f AND n = n (where AND denotes the bitwise AND operator).
0, 1, 2, 3, 5, 5, 55, 55, 8, 13, 987, 987, 13, 13, 17711, 17711, 21, 21, 55, 55, 21, 21, 55, 55, 89, 89, 987, 987, 1597, 1597, 1836311903, 1836311903, 34, 55, 34, 55, 55, 55, 55, 55, 233, 233, 17711, 17711, 1597, 1597, 17711, 17711, 55, 55, 55, 55, 55, 55, 55
Offset: 0
Links
- Paolo Xausa, Table of n, a(n) for n = 0..3800
Programs
-
Mathematica
A370730[n_] := Block[{k = -1}, While[BitAnd[Fibonacci[++k], n] != n]; Fibonacci[k]]; Array[A370730, 100,0] (* Paolo Xausa, Mar 01 2024 *)
-
PARI
a(n) = { for (k = 0, oo, my (f = fibonacci(k)); if (bitand(f, n)==n, return (f););); }
Comments