login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A264964 Numbers that are the sum of two binary palindromes of the same (binary) length. 1
0, 2, 6, 10, 12, 14, 18, 24, 30, 34, 38, 42, 44, 48, 52, 54, 58, 62, 66, 78, 84, 90, 96, 102, 108, 114, 126, 130, 138, 146, 150, 158, 164, 166, 170, 172, 178, 180, 184, 186, 192, 198, 200, 204, 206, 212, 214, 218, 220, 226, 234, 238, 246, 254, 258, 282, 294, 306, 318, 324, 330, 342, 348, 354, 360, 372, 378, 384, 390, 396 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Theorem: Adding two binary palindromes of length k >= 2 in all possible ways produces 3^floor((k-1)/2) distinct sums. (There are 2^floor((k-1)/2) binary palindromes of length k - see A006995.)

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..13122

EXAMPLE

There are four binary palindromes of length 5, namely (written in base 10) 17, 21, 27, 31, and adding them in pairs gives nine distinct numbers: 34, 38, 42, 44, 48, 52, 54, 58, 62.

There are eight binary palindromes of length 7, namely (written in base 10) 65, 73, 85, 93, 99, 107, 119, 127, and adding them in pairs gives 27 distinct numbers: 130, 138, 146, 150, 158, 164, 166, 170, 172, 178, 180, 184, 186, 192, 198, 200, 204, 206, 212, 214, 218, 220, 226, 234, 238, 246, 254.

MATHEMATICA

f[n_] := Select[Map[FromDigits /@ IntegerDigits[#, 2] &, Map[Function[k, {k, # - k}], Range@ Floor[#/2]] &@ n], AllTrue[#, Reverse@ # == # &@ IntegerDigits@ # &] && IntegerLength@ First@ # == IntegerLength@ Last@ # &]; Prepend[Select[Range@ 400, Length@ f@ # > 0 &], 0] (* Michael De Vlieger, Nov 29 2015, Mma version 10 *)

Join[{0}, Table[Total/@Tuples[FromDigits[#, 2]&/@Select[Tuples[{1, 0}, n], #[[1]] != 0&&#==Reverse[#]&], 2]//Union, {n, 8}]//Flatten] (* Harvey P. Dale, Apr 12 2017 *)

CROSSREFS

Cf. A006995, A261679, A241491, A261678.

Sequence in context: A057921 A095300 A097381 * A195064 A055743 A189680

Adjacent sequences:  A264961 A264962 A264963 * A264965 A264966 A264967

KEYWORD

nonn,base

AUTHOR

N. J. A. Sloane, Nov 29 2015

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 12:41 EDT 2019. Contains 327113 sequences. (Running on oeis4.)