This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A206920 Sum of the first n binary palindromes; a(n) = Sum_{k=1..n} A006995(k). 6
 0, 1, 4, 9, 16, 25, 40, 57, 78, 105, 136, 169, 214, 265, 328, 393, 466, 551, 644, 743, 850, 969, 1096, 1225, 1378, 1543, 1732, 1927, 2146, 2377, 2632, 2889, 3162, 3459, 3772, 4097, 4438, 4803, 5184, 5571, 5974, 6401, 6844, 7299, 7770, 8265, 8776, 9289, 9850 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Different from A206919. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 FORMULA Let n > 3, p = A006995(n), m = floor(log_2(p)), then a(n) = (8/7)*((3/4)*(4 - (-1)^m)/(3 + (-1)^m)*2^(3*floor(m/2)) - 1) + (floor(p/2^floor(m/2)) mod 2)*p + 2^m + 1 + Sum_{k = 1..(floor(m/2) - 1)} (floor(p/2^k) mod 2)*(2^k + 2^(m-k) + 2^(m-floor(m/2) + 1)*(4^(floor(m/2) - k - 1) - 1) + (2 - (-1)^m)*2^floor(m/2) + 2^(floor(m/2) - k)*(p - floor((p mod (2^(m-k+1)))/2^k)*2^k)). - [Corrected; missing factor to the sum term (2 -(-1)^m) pasted by the author, Sep 07 2018] From Hieronymus Fischer, Sep 07 2018: (Start) Slightly simplified and better readable formula: a(n) = A_m + B_m + 2^m + 1 + Sum_{k = 1..(m2-1)} C_k*(D_k + E_k + F_k + G_k), where m2 = floor(m/2), A_m = (8/7)*((3/4)*(4-(-1)^m)/(3+(-1)^m)*2^(3*m2)-1), B_m = p*(floor(p/2^m2) mod 2), C_k = floor(p/2^k) mod 2, D_k = 2^k + 2^(m-k), E_k = 2^(m-m2+1)*(4^(m2-k-1)-1), F_k = (2 - (-1)^m)*2^m2, G_k = 2^(m2-k) * (p - p mod (2^(m-k+1)) + p mod 2^k). (End) G.f.: g(x) = (x^2 + 3x^3 + Sum_{j >= 1} (3*2^j*(1 - x^floor((j+1)/2))/(1-x)*x^((1/2) - floor((j+1)/2)) + f_j(x) - f_j(1/x))*x^(2*2^floor(j/2) + 3*2^floor((j-1)/2) - (1/2)))/(1-x), where the f_j(x) are the same as defined for the g.f. of A006995. EXAMPLE a(1) = 0, since A006995(1) = 0; a(4) = 9, since the sum of the first 4 binary palindromes is 9 = 0 + 1 + 3 + 5. MATHEMATICA Accumulate@ Map[FromDigits[#, 2] &, Select[Array[IntegerDigits[#, 2] &, 600, 0], PalindromeQ]] (* Michael De Vlieger, Feb 20 2018 *) PROG (Haskell) a206920 n = a206920_list !! (n-1) a206920_list = scanl1 (+) a006995_list -- Reinhard Zumkeller, Feb 27 2012 CROSSREFS Cf. A006995, A206918, A206919. Sequence in context: A019571 A008024 A008056 * A108612 A065741 A188061 Adjacent sequences:  A206917 A206918 A206919 * A206921 A206922 A206923 KEYWORD nonn,base AUTHOR Hieronymus Fischer, Feb 18 2012 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 March 23 04:46 EDT 2019. Contains 321422 sequences. (Running on oeis4.)