A269570 Binary fractility of n.
1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 3, 4, 1, 2, 3, 1, 2, 5, 2, 2, 2, 2, 2, 3, 3, 1, 5, 6, 1, 4, 3, 5, 3, 1, 2, 4, 2, 2, 6, 3, 2, 7, 3, 2, 2, 4, 3, 7, 2, 1, 4, 4, 3, 4, 2, 1, 5, 1, 7, 12, 1, 6, 5, 1, 3, 5, 6, 2, 3, 8, 2, 7, 2, 5, 5, 2, 2, 4, 3, 1, 6, 11, 4
Offset: 2
Examples
D(1/7) = (3,3,3,3, ... ) D(2/7) = (2,3,3,3, ... ) D(3/7) = (2,1,2,1,2,1,2,1, ... ) D(4/7) = (1,3,3,3, ... ) D(5/7) = (1,2,1,2,1,2, ... ) D(6/7) = (1,1,2,1,2,1, ... ) There are 2 distinct periods: (3) and (1,2), so that a(7) = 2.
Programs
-
Mathematica
A269570[n_] := CountDistinct[With[{l = NestWhileList[Rescale[#, {1/2^(Floor[-Log[2, #]] + 1), 1/2^(Floor[-Log[2, #]])}] &, #, UnsameQ, All]}, Min@l[[First@First@Position[l, Last@l] ;;]]] & /@ Range[1/n, 1 - 1/n, 1/n]] (* Davin Park, Nov 19 2016 *)
Comments