A259658 Let f(x) be the absolute value of the difference between x and its base-2 reversal. Let g(x) be the number of times f(x) must be applied to x for the result to be 0. a(n) is the smallest value of x for which g(x) is n.
0, 1, 2, 11, 38, 271, 544, 2093, 2624, 8607, 17984, 35343, 35904, 70671, 71744, 141327, 143424, 282639, 286784, 565263, 573504, 1130511, 1146944, 2261007, 2293824, 4521999, 4587584, 9043983, 9175104, 18087951, 18350144, 36175887, 36700224, 72351759, 73400384
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-2).
Programs
-
Magma
I:=[0,1,2,11,38,271,544,2093,2624, 8607,17984,35343, 35904,70671]; [n le 14 select I[n] else 3*Self(n-2)-2*Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 10 2015
-
Mathematica
CoefficientList[Series[x (18144 x^12 + 12800 x^11 - 13708 x^10 -11200 x^9 - 2870 x^8 - 1068 x^7 - 1302 x^6 - 434 x^5 - 240 x^4 - 32 x^3 - 8 x^2 - 2 x - 1)/((1 - x) (x + 1) (2 x^2 - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jul 10 2015 *) LinearRecurrence[{0,3,0,-2},{0,1,2,11,38,271,544,2093,2624,8607,17984,35343,35904,70671},50] (* Harvey P. Dale, Nov 23 2022 *)
Formula
G.f.: -x*(18144*x^12 +12800*x^11 -13708*x^10 -11200*x^9 -2870*x^8 -1068*x^7 -1302*x^6 -434*x^5 -240*x^4 -32*x^3 -8*x^2 -2*x-1)/ ((x-1) *(x+1) *(2*x^2-1)). - Alois P. Heinz, Jul 02 2015
Extensions
a(0), a(19)-a(34) from Alois P. Heinz, Jul 02 2015
Comments