This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A206919 Sum of binary palindromes <= n. 1
 0, 1, 1, 4, 4, 9, 9, 16, 16, 25, 25, 25, 25, 25, 25, 40, 40, 57, 57, 57, 57, 78, 78, 78, 78, 78, 78, 105, 105, 105, 105, 136, 136, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 214, 214, 214, 214, 214, 214, 265, 265, 265, 265, 265, 265, 265, 265 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Sum of binary palindromes A006995(k) <= n. Different from A206920. LINKS FORMULA a(n) = Sum_{k=1..A206915(A206913(n)) A006995(k). a(n) = A206920(A206915(A206913(n))). Let p = A206913(n) > 3, 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 08 2018] EXAMPLE a(2)=1, since the only binary palindromes <= 1 are p=0 and p=1; a(5)=9, since the sum of all binary palindromes <= 5 is 9 = 0 + 1 + 3 + 5. PROG (PARI) a(n) = sum(k=1, n, my(b=binary(k)); if (b==Vecrev(b), k)); \\ Michel Marcus, Sep 09 2018 CROSSREFS Cf. A006995, A206913, A206915. Sequence in context: A014694 A065730 A246934 * A168039 A145445 A008794 Adjacent sequences:  A206916 A206917 A206918 * A206920 A206921 A206922 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 20 19:23 EDT 2019. Contains 321349 sequences. (Running on oeis4.)