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).
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
Links
- Paolo Xausa, Table of n, a(n) for n = 0..10000
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.
Comments