The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020330 Numbers whose base-2 representation is the juxtaposition of two identical strings. 38

%I #82 Mar 01 2023 02:08:18

%S 3,10,15,36,45,54,63,136,153,170,187,204,221,238,255,528,561,594,627,

%T 660,693,726,759,792,825,858,891,924,957,990,1023,2080,2145,2210,2275,

%U 2340,2405,2470,2535,2600,2665,2730,2795,2860,2925,2990,3055,3120,3185,3250

%N Numbers whose base-2 representation is the juxtaposition of two identical strings.

%C All differences are in union of A000051 and A001576. - _Vladimir Shevelev_, Dec 07 2013

%H Reinhard Zumkeller, <a href="/A020330/b020330.txt">Table of n, a(n) for n = 1..8191</a>

%H Daniel M. Kane, Carlo Sanna and Jeffrey Shallit, <a href="https://doi.org/10.1007/s00493-019-3933-3">Waring's Theorem for Binary Powers</a>, Combinatorica, Vol. 39, No. 6 (2019), pp. 1335-1350, <a href="https://arxiv.org/abs/1801.04483">arXiv preprint</a>, arXiv:1801.04483 [math.NT], 2018.

%H Parthasarathy Madhusudan, Dirk Nowotka, Aayush Rajasekaran and Jeffrey Shallit, <a href="https://arxiv.org/abs/1710.04247">Lagrange's Theorem for Binary Squares</a>, arXiv:1710.04247 [math.NT], 2017-2018.

%H Manfred Madritsch and Stephan Wagner, <a href="https://doi.org/10.1007/s00605-009-0126-y">A central limit theorem for integer partitions</a>, Monatshefte für Mathematik, Vol. 161, No. 1 (2010), pp. 85-114, <a href="https://www.researchgate.net/publication/225845584_A_central_limit_theorem_for_integer_partitions">alternative link</a>.

%H Aayush Rajasekaran, <a href="https://uwspace.uwaterloo.ca/handle/10012/13202">Using Automata Theory to Solve Problems in Additive Number Theory</a>, MS thesis, University of Waterloo, 2018.

%F a(n) = n + 2*n*2^floor(log_2(n)). - _Ralf Stephan_, Dec 07 2004

%F Sum_{n>=1} 1/a(n) = A330157. - _Amiram Eldar_, Oct 22 2020

%F a(n) = n * (2^A070939(n) + 1). - _Jianing Song_, Apr 10 2021

%e 36 is a term because 36 = 100100_2, which is 100 followed by 100.

%t Table[n + 2 n 2^Floor[Log[2, n]], {n, 50}] (* _T. D. Noe_, Dec 10 2013 *)

%o (Haskell)

%o a020330 n = foldr (\d v -> 2 * v + d) 0 (bs ++ bs) where

%o bs = a030308_row n

%o -- _Reinhard Zumkeller_, Feb 19 2013

%o (PARI) a(n)=n+n<<#binary(n) \\ _Charles R Greathouse IV_, Mar 29 2013

%o (PARI) is(n)=my(L=#binary(n)\2); n>>L==bitand(n,2^L-1) \\ _Charles R Greathouse IV_, Mar 29 2013

%o (Magma) [n+2*n*2^Floor(Log(2, n)): n in [1..50]]; // _Vincenzo Librandi_, Apr 05 2018

%o (Python)

%o def a(n): return int(bin(n)[2:]*2, 2)

%o print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Mar 10 2021

%o (Python)

%o def A020330(n): return (n<<n.bit_length())|n # _Chai Wah Wu_, Feb 28 2023

%Y Subsequence of A121016.

%Y Cf. A062383, A030308, A007088, A330157, A070939.

%Y Column k=0 of A246830, column k=1 of A246834.

%K nonn,base,easy,look

%O 1,1

%A _David W. Wilson_, Melia Aldridge (ma38(AT)spruce.evansville.edu)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 12:18 EDT 2024. Contains 372533 sequences. (Running on oeis4.)