Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A006995
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A006995 M2403
%S A006995 0,1,3,5,7,9,15,17,21,27,31,33,45,51,63,65,73,85,93,99,107,119,127,129,
%T A006995 153,165,189,195,219,231,255,257,273,297,313,325,341,365,381,387,403,
%U A006995 427,443,455,471,495,511,513,561,585,633,645,693,717,765,771,819,843
%N A006995 Numbers whose binary expansion is palindromic.
%D A006995 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, 
               Academic Press, 1995 (includes this sequence).
%H A006995 T. D. Noe, <a href="b006995.txt">Table of n, a(n) for n=1..1000</a>
%H A006995 <a href="Sindx_Bi.html#binary">Index entries for sequences related to 
               binary expansion of n</a>
%F A006995 Comments from Hieronymus Fischer (Hieronymus.Fischer(AT)gmx.de), Dec 
               31 2008 (Start): Written as a decimal, a(10^n) has 2*n digits. For 
               n>1, the decimal expansion of a(10^n) starts with 22..., 23... or 
               24...
%F A006995 a(1000)=249903, a(10^10)=24502928886295666773.
%F A006995 An inequality valid for n>1: (2/9)*n^2<a(n)<(1/4)*(n+1)^2.
%F A006995 lim sup a(n)/n^2=1/4 for n-->oo.
%F A006995 lim inf a(n)/n^2=2/9 for n-->oo.
%F A006995 Set k:=k(n):=floor(log_2(n)), i:=i(n):=n-2^k+1, j:=j(n):=i-2^(k-1). Then
%F A006995 a(n)=2^(2k-q)+1+2^p*a(m), where p, q and m are determined as follows:
%F A006995 Case 1: If n+1=2^k, then set p=0, q=2, m=0;
%F A006995 Case 2: If 2^k<n+1<2^k+2^(k-1), then set p=k- floor(log_2(i)), q=2, m=2^floor(log_2(i))+i-1;
%F A006995 Case 3: If n+1=2^k+2^(k-1), then set p=0, q=1, m=0;
%F A006995 Case 4: If 2^k+2^(k-1)<n+1<2^(k+1), then set p=k- floor(log_2(j))-1, 
               q=1, m=2^floor(log_2(i))+i-1;
%F A006995 a(2^n)=2^(2n-2)+2^(n-1)+1; a(2^n-2)=2^(2n-2)-1; a(2^n-1)=2^(2n-2)+1; 
               (End)
%F A006995 A030101(n) = n. - David Wilson, Jun 09 2009
%t A006995 palQ[n_Integer, base_Integer] := Module[{idn=IntegerDigits[n, base]}, 
               idn==Reverse[idn]]; then to generate any base b sequence: Select[Range[1000], 
               palQ[ #, b]&]
%o A006995 (PARI) for(n=1,1000,l=length(binary(n)); b=binary(n); if(sum(i=1,l,abs(component(b,
               i)-component(b,l+1-i)))==0,print1(n,",")))
%o A006995 (PARI) for(i=0,999,if(vecextract(t=binary(i),"-1..1")==t,print1(i","))) 
               - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Dec 17 2007
%Y A006995 Palindromes in bases 2 through 10: A006995, A014190, A014192, A029952, 
               A029953, A029954, A029803, A029955, A002113.
%Y A006995 Sequence in context: A029608 A145388 A121820 this_sequence A163410 A064896 
               A076188
%Y A006995 Adjacent sequences: A006992 A006993 A006994 this_sequence A006996 A006997 
               A006998
%K A006995 base,easy,nonn,nice
%O A006995 1,3
%A A006995 N. J. A. Sloane (njas(AT)research.att.com), Robert G. Wilson v (rgwv(AT)rgwv.com), 
               Mira Bernstein, L. J. Upton
%E A006995 A-number in formula corrected by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), 
               Jun 18 2009

    
page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research