cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A303534 Amount by which n exceeds the largest binary palindrome less than or equal to n.

This page as a plain text file.
%I A303534 #21 May 13 2018 07:38:01
%S A303534 0,0,1,0,1,0,1,0,1,0,1,2,3,4,5,0,1,0,1,2,3,0,1,2,3,4,5,0,1,2,3,0,1,0,
%T A303534 1,2,3,4,5,6,7,8,9,10,11,0,1,2,3,4,5,0,1,2,3,4,5,6,7,8,9,10,11,0,1,0,
%U A303534 1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,8,9,10,11,0,1,2,3,4,5,6,7,0,1,2,3
%N A303534 Amount by which n exceeds the largest binary palindrome less than or equal to n.
%H A303534 Antti Karttunen, <a href="/A303534/b303534.txt">Table of n, a(n) for n = 0..65537</a>
%H A303534 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A303534 a(n) = n - A206913(n).
%e A303534 The largest binary palindrome that doesn't exceed 30 is 27 (11011 r2). 30 - 27 = 3, so a(30) = 3.
%o A303534 (PARI) isA006995(n) = Vecrev(n=binary(n))==n;
%o A303534 a(n) = {my(k=0); while(!isA006995(n-k), k++); k;} \\ _Altug Alkan_, Apr 25 2018
%Y A303534 A006995 lists the binary palindromes.
%Y A303534 A206913 gives the largest binary palindrome that does not exceed n.
%Y A303534 Cf. also A261424 (analog in base 10), A280506, A303536.
%K A303534 nonn,easy,base,look
%O A303534 0,12
%A A303534 _Allan C. Wechsler_, Apr 25 2018
%E A303534 More terms from _Altug Alkan_, Apr 25 2018