This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A178225 Characteristic function of A006995 (binary palindromes). 19
 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS a(n)=1 if n is in A006995, a(n)=0 otherwise. For small n, identical to parity of A175096. Comment by Franklin T. Adams-Watters: (Start) Any permutation of the runs of n gives another such permutation when reversed. This pairs up all non-palindromic permutations of the runs of n. Thus the parity of A175096(n) is the parity of the number of palindromic run-permutations of n. For small n, this is 1 when n is a binary palindrome, and 0 otherwise. The first exception is 43, binary 101011, which has a nontrivial palindromic run-permutation 45, binary 101101. Another kind of exception occurs first for n = 365, binary 101101101, which is a palindrome, but has another palindromic run-permutation 427, binary 110101011. (End) Given an index n such that a(n)=1, then the following A164126(A206915(n))-1 terms will be 0. n'=A164126(A206915(n)) is the next term with a(n')=1. Therefore, if we subtract 1 from each term of A164126, we get the sequence of run lengths of 0's. - Hieronymus Fischer, Feb 19 2012. Given an index n such that a(n)=0, then p=A206913(n) is the greatest index pn such that a(q)=1, which implies a(k)=0 for all k with n<=k=1} x^(3*2^j)*(f_j(x)+f_j(1/x)), where the f_j(x) are defined as follows:   f_1(x)=x, and for j > 1,   f_j(x) = x^3*Product_{k=1..floor((j-1)/2)} (1+x^b(j,k)), where b(j,k) = 2^(floor((j-1)/2)-k)*((3+(-1)^j)*2^(2*k+1)+4) for k > 1, and b(j,1) = (2+(-1)^j)*2^(floor((j-1)/2)+1). The first explicit terms of this g.f. are   g(x) = 1 + x + x^3 + (f_1(x) + f_1(1/x))*x^6 + (f_2(x) + f_2(1/x))*x^12 + (f_3(x)+f_3(1/x))*x^24 + (f_4(x) + f_4(1/x))*x^48 + (f_5(x) + f_5(1/x))*x^96 + ... = 1 + x + x^3 + (x+1/x)*x^6 + (x^3+1/x^3)*x^12 + (x^3*(1+x^4) + (1+1/x^4)/x^3)*x^24 + (x^3*(1+x^12) + (1+1/x^12)/x^3)*x^48 + (x^3*(1+x^8)(1+x^20) + (1+1/x^20)(1+1/x^8)/x^3)*x^96 + ...  - Hieronymus Fischer, Apr 02 2012 EXAMPLE a(3)=1, since 3 is binary palindromic; a(4)=0, since 4 is not palindromic. PROG (Chipmunk BASIC v3.6.4(b8)) rem http://www.nicholson.com/rhn/basic/ for n=0 to 200 r\$="" s\$=bin\$(n) for i=len(s\$) to 1 step -1 r\$=r\$+mid\$(s\$, i, 1) next i if r\$ = s\$ then c=1 : else c=0 print str\$(c)+", "; next n print end (Haskell) a178225 n = fromEnum \$ n == a030101 n  -- Reinhard Zumkeller, Oct 21 2011 (PARI) a(n) = my(b=binary(n)); b == Vecrev(b); \\ Michel Marcus, Feb 13 2019 CROSSREFS Cf. A006995, A175096, A178226 Cf. A136522. See A206915 for the partial sums. Sequence in context: A141735 A322585 A322860 * A264739 A257170 A073097 Adjacent sequences:  A178222 A178223 A178224 * A178226 A178227 A178228 KEYWORD base,easy,nonn AUTHOR Jeremy Gardiner, May 23 2010 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 October 20 15:29 EDT 2019. Contains 328267 sequences. (Running on oeis4.)