|
|
A222813
|
|
Numbers whose binary representation is palindromic and in which all runs of 0's and 1's have length at least 2.
|
|
3
|
|
|
3, 7, 15, 31, 51, 63, 99, 127, 195, 231, 255, 387, 455, 511, 771, 819, 903, 975, 1023, 1539, 1651, 1799, 1935, 2047, 3075, 3171, 3315, 3591, 3687, 3855, 3999, 4095, 6147, 6371, 6643, 7175, 7399, 7695, 7967, 8191, 12291, 12483, 12771, 13107, 13299, 14343, 14535, 14823, 15375, 15567, 15903, 16191, 16383, 24579
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
Intersection of A006995 and A033015: binary palindromes with no isolated digit.
There are A000045(A004526(k)) = Fibonacci(floor(k/2)) terms between 2^(k-1) and 2^k.
|
|
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) {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
|
|
|
STATUS
|
approved
|
|
|
|