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!)
A335956 a(n) = (2^n - 1)*2^valuation(n, 2) for n > 0 and a(0) = 0. 3
0, 1, 6, 7, 60, 31, 126, 127, 2040, 511, 2046, 2047, 16380, 8191, 32766, 32767, 1048560, 131071, 524286, 524287, 4194300, 2097151, 8388606, 8388607, 134217720, 33554431, 134217726, 134217727, 1073741820, 536870911, 2147483646, 2147483647, 137438953440, 8589934591 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
For n > 0, a(n) = A000225(n) * A006519(n). - Antti Karttunen, Jul 21 2020
EXAMPLE
a(4) = (2^4 - 1) * 4 = 15 * 4 = 60.
a(5) = (2^5 - 1) * 1 = 31 * 1 = 31.
MAPLE
a := n -> `if`(n=0, 0, (2^n-1)*2^padic[ordp](n, 2)): seq(a(n), n=0..33);
MATHEMATICA
a[0] := 0; a[n_] := (2^n - 1) 2^IntegerExponent[n, 2]; Array[a, 34, 0]
PROG
(PARI) a(n) = if (n, (2^n - 1)*2^valuation(n, 2), 0); \\ Michel Marcus, Jul 21 2020
(Python)
def A335956(n): return ((1<<n)-1)*(n&-n) # Chai Wah Wu, Mar 17 2023
CROSSREFS
Sequence in context: A028423 A269912 A042117 * A179885 A217548 A335734
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 21 2020
STATUS
approved

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 April 25 10:22 EDT 2024. Contains 371967 sequences. (Running on oeis4.)