The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A327961 Sum of products of n-bit numbers with their n-bit reverse. 1
 0, 1, 13, 122, 1028, 8328, 66576, 530464, 4227136, 33718400, 269222144, 2151154176, 17196647424, 137514452992, 1099847176192, 8797569425408, 70375186644992, 562977870741504, 4503719886520320, 36029312415170560, 288232575175229440, 2305852355063054336 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS For each n, let k go from 0 to 2^n-1. Write each k in binary using n bits, reverse the bits, then multiply by k. a(n) is the sum of these products. For example, when n = 2, the 2-bit strings are 00, 01, 10, and 11 (in decimal: 0,1,2,3). When they are bit-reversed, we get 00, 10, 01, and 11 (in decimal: 0,2,1,3). Multiplying and adding the corresponding pairs, we get a(2) = 0*0 + 1*2 + 2*1 + 3*3 = 13. LINKS Colin Barker, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (18,-112,288,-256). FORMULA a(n) = Sum_{k=0..2^n-1} k * A030109(2^n+k). a(n+1) = 4*a(n) + 2^(3n) + 2^(2n-1) - 2^(n-1). a(n) = n*2^(2*n-3) + 2^(3n-2) + 2^(n-2) - 2^(2n-1). From Colin Barker, Oct 01 2019: (Start) G.f.: x*(1 - 5*x) / ((1 - 2*x)*(1 - 4*x)^2*(1 - 8*x)). a(n) = 2^(n-3) * (2*(2^n-1)^2 + 2^n*n). a(n) = 18*a(n-1) - 112*a(n-2) + 288*a(n-3) - 256*a(n-4) for n>3. (End) E.g.f.: (1/4)*(exp(2*x) + exp(8*x) + 2*exp(4*x)*(-1 + x)). - Stefano Spezia, Oct 01 2019 MATHEMATICA CoefficientList[Series[x (1 - 5 x)/((1 - 2 x) (1 - 4 x)^2*(1 - 8 x)), {x, 0, 21}], x] (* Michael De Vlieger, Oct 01 2019 *) PROG (Python) revbits = lambda i, n: int(bin(i)[2:].rjust(n, '0')[::-1], 2) def a(n):   return sum(i * revbits(i, n) for i in range(2**n)) print([a(n) for n in range(22)]) (PARI) f(n) = (fromdigits(Vecrev(binary(n)), 2) - 1)/2; \\ A030109 a(n) = sum(k=0, 2^n, f(2^n+k)*k); \\ Michel Marcus, Oct 01 2019 (PARI) concat(0, Vec(x*(1 - 5*x) / ((1 - 2*x)*(1 - 4*x)^2*(1 - 8*x)) + O(x^25))) \\ Colin Barker, Oct 01 2019 CROSSREFS Cf. A030101, A030109, A049773. Sequence in context: A326569 A339057 A016230 * A278276 A201382 A101186 Adjacent sequences:  A327958 A327959 A327960 * A327962 A327963 A327964 KEYWORD nonn,base,easy AUTHOR Peter Ward, Sep 30 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 28 07:44 EST 2020. Contains 338702 sequences. (Running on oeis4.)