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!)
A038713 a(n) = n XOR (n-1), i.e., nim-sum of sequential pairs, written in binary. 3

%I #30 Sep 21 2023 01:45:14

%S 1,11,1,111,1,11,1,1111,1,11,1,111,1,11,1,11111,1,11,1,111,1,11,1,

%T 1111,1,11,1,111,1,11,1,111111,1,11,1,111,1,11,1,1111,1,11,1,111,1,11,

%U 1,11111,1,11,1,111,1,11,1,1111,1,11,1,111,1,11,1,1111111,1,11,1,111,1

%N a(n) = n XOR (n-1), i.e., nim-sum of sequential pairs, written in binary.

%H Vincenzo Librandi, <a href="/A038713/b038713.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Ni#Nimsums">Index entries for sequences related to Nim-sums</a>

%F a(n) = (10^A001511(n) - 1)/(10 - 1).

%F Multiplicative with a(2^e) = (10^(e+1) - 1)/9, a(p^e) = 1 if p odd.

%F G.f.: Sum_{k>=0} 10^k * x^(2^k) / (1 - x^(2^k)). - _Ilya Gutkovskiy_, Dec 15 2020

%F Dirichlet g.f.: zeta(s) * 2^s/(2^s - 10). - _Amiram Eldar_, Sep 21 2023

%e a(6) = 11 because 110 XOR 101 = 11 base 2.

%t Table[(10^IntegerExponent[2*n, 2] - 1)/9, {n, 100}] (* _Vincenzo Librandi_, Mar 11 2013 *)

%o (PARI) a(n)=if(n<1,0, (10^(valuation(n,2)+1)-1)/9) /* _Michael Somos_, Apr 28 2005 */

%o (Magma) [(10^(Valuation(n, 2)+1)-1)/9: n in [1..70]]; // _Vincenzo Librandi_, Mar 11 2013

%Y Cf. A038712 translated to binary, A001511 translated to unary (repeated 1's).

%K mult,easy,nonn

%O 1,2

%A _Henry Bottomley_, May 02 2000

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 June 6 07:20 EDT 2024. Contains 373115 sequences. (Running on oeis4.)