OFFSET
1,1
COMMENTS
These are the decimal representations of A061851 read as base-2 numbers.
The terms with an odd number L = 2k-1 of bits, i.e., 2^(L-1) < a(n) < 2^L, are given by the terms of A033015 with length k, shifted k-1 digits to the left and 'OR'ed with the binary reversal of the term. Terms with an even number L = 2k of digits are given as m*2^k + (binary reversal of m) where m runs over the k-bit terms from A033015 and the k-1 bit terms with the last bit negated appended). This explains the FORMULA for the number of terms of given size. - M. F. Hasler, Oct 17 2022
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 608 terms from N. J. A. Sloane)
FORMULA
EXAMPLE
51 (base 10) = 110011 (base 2), which is a palindrome and has three runs all of length 2.
MATHEMATICA
brpalQ[n_]:=Module[{idn2=IntegerDigits[n, 2]}, idn2==Reverse[idn2] && Min[ Length/@ Split[idn2]]>1]; Select[Range[25000], brpalQ] (* Harvey P. Dale, May 21 2014 *)
PROG
(PARI) is(n)=is_A033015(n)&&Vecrev(n=binary(n))==n \\ M. F. Hasler, Oct 06 2022
(PARI) {A222813_row(n, s=A033015_row(n\/2))=apply(A030101, if(n%2, s\2, n>2, s=setunion([k*2+1-k%2|k<-A033015_row(n\2-1)], s), s=[1]))+s<<(n\2)} \\ Terms with n bits, i.e. between 2^(n-1) and 2^n. - M. F. Hasler, Oct 17 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Mar 11 2013
STATUS
approved