login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140670 a(n) is one if n is odd else one less than largest power of two dividing it. 2
1, 1, 1, 3, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 1, 15, 1, 1, 1, 3, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 1, 31, 1, 1, 1, 3, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 1, 15, 1, 1, 1, 3, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 1, 63, 1, 1, 1, 3, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 1, 15, 1, 1, 1, 3, 1, 1, 1, 7, 1, 1, 1, 3, 1, 1, 1, 31, 1, 1, 1, 3, 1, 1 (list; graph; refs; listen; history; internal format)
OFFSET

1,4

FORMULA

a(n) is multiplicative with a(2^e) = 2^e - 1 if e>0, a(p^e) = 1 if p>2.

a(2*n + 1) = 1. a(-n) = a(n). a(2*n) = 2 * a(n) + (-1)^n unless n=0.

Dirichlet g.f. zeta(s)*(1+2^(1-2s)-2^(1-s))/(1-2^(1-s)). - R. J. Mathar, Feb 07 2011

PROG

(PARI) {a(n) = if(n==0, 0, if(n%2, 1, 2^valuation(n, 2) - 1))}

CROSSREFS

Sequence in context: A179701 A102480 A157964 * A185587 A068845 A152884

Adjacent sequences:  A140667 A140668 A140669 * A140671 A140672 A140673

KEYWORD

nonn,mult

AUTHOR

Michael Somos, May 21 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 00:09 EST 2012. Contains 205978 sequences.