Multiplication with the Matrix (Subscript[A, n]) (Chapter 7, p. 153/154)

n = 20000;
BitLength := Developer`BitLength;
indices[i_] := indices[i] = 
        i + Join[
            2^(Range@BitLength[n - i] - 
                  1), -2^(Range@BitLength[i - 1] - 1)]
diagonal = Prime[Range@n];
A[x_] := 
        diagonal* x + 
          MapIndexed[
            Plus @@ x[[
                  indices[#2[[1]]]]] &, x];