Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A129760
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A129760 Bitwise AND of n-1 and n written in base 2. +0
3
0, 0, 2, 0, 4, 4, 6, 0, 8, 8, 10, 8, 12, 12, 14, 0, 16, 16, 18, 16, 20, 20, 22, 16, 24, 24, 26, 24, 28, 28, 30, 0, 32, 32, 34, 32, 36, 36, 38, 32, 40, 40, 42, 40, 44, 44, 46, 32, 48, 48, 50, 48, 52, 52, 54, 48, 56, 56, 58, 56, 60, 60, 62, 0, 64, 64, 66, 64, 68, 68, 70, 64, 72, 72, 74 (list; graph; listen)
OFFSET

1,3

COMMENT

Also the number of Ducci sequences with period n.

REFERENCES

R. Brown and J. L. Merzel, The number of Ducci sequences with a given period, Fib. Quart., 45 (2007), 115-121.

FORMULA

Equals n - A006519(n). - N. J. A. Sloane (njas(AT)research.att.com), May 26 2008

a(n) = n AND n-1

EXAMPLE

a(6) = 6 AND 5 = binary 110 AND 101 = binary 100 = 4.

PROGRAM

(C) int a(int n) { return n & (n-1); }

CROSSREFS

Cf. A038712, A086799, A104594, A059991, A006519.

Sequence in context: A134271 A094403 A166085 this_sequence A057377 A145811 A147980

Adjacent sequences: A129757 A129758 A129759 this_sequence A129761 A129762 A129763

KEYWORD

easy,nonn

AUTHOR

Russ Cox (rsc(AT)swtch.com), May 15 2007

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 20 16:54 EST 2009. Contains 171081 sequences.


AT&T Labs Research