%I #12 Aug 07 2023 13:01:40
%S 0,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,
%T 1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,
%U 1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1
%N Characteristic function of A154809 (numbers that are not binary palindromes)
%C a(n)=1 if n is in A154809, a(n)=0 otherwise.
%C Identical to parity of A086757 (Smallest prime p such that n is a palindrome in base p representation)
%H Antti Karttunen, <a href="/A178226/b178226.txt">Table of n, a(n) for n = 0..65537</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) = 1 - A178225(n). - _Antti Karttunen_, Dec 15 2017
%t Table[If[IntegerDigits[n,2]==Reverse[IntegerDigits[n,2]],0,1],{n,0,120}] (* _Harvey P. Dale_, Aug 07 2023 *)
%o (PARI) A178226(n) = (n!=subst(Polrev(binary(n)),x,2)); \\ _Antti Karttunen_, Dec 15 2017
%Y Cf. A030101, A057891, A086757, A154809, A178225, A280505, A280506.
%K base,easy,nonn
%O 0,1
%A _Jeremy Gardiner_, May 23 2010
|