Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A038713
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A038713 a(n) = n XOR (n-1), i.e. nim-sum of sequential pairs, written in binary. +0
2
1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 11111, 1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 111111, 1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 11111, 1, 11, 1, 111, 1, 11, 1, 1111, 1, 11, 1, 111, 1, 11, 1, 1111111, 1, 11, 1, 111, 1 (list; graph; listen)
OFFSET

1,2

LINKS

Index entries for sequences related to Nim-sums

FORMULA

a(n) = (10^A001511(n)-1)/(10-1)

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

Multiplicative with a(p^e) = (10^e-1)/9 if p = 2, 1 otherwise

EXAMPLE

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

PROGRAM

(PARI) a(n)=if(n<1, 0, (10^(valuation(n, 2)+1)-1)/9) /* Michael Somos Apr 28 2005 */

CROSSREFS

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

Sequence in context: A086994 A104490 A164851 this_sequence A130556 A120449 A101623

Adjacent sequences: A038710 A038711 A038712 this_sequence A038714 A038715 A038716

KEYWORD

mult,easy,nonn

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), May 02 2000

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 December 6 13:45 EST 2009. Contains 170429 sequences.


AT&T Labs Research