login
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
OFFSET
0,3
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
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 21 2020
STATUS
approved