cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A335956 a(n) = (2^n - 1)*2^valuation(n, 2) for n > 0 and a(0) = 0.

This page as a plain text file.
%I A335956 #20 Mar 17 2023 14:33:17
%S A335956 0,1,6,7,60,31,126,127,2040,511,2046,2047,16380,8191,32766,32767,
%T A335956 1048560,131071,524286,524287,4194300,2097151,8388606,8388607,
%U A335956 134217720,33554431,134217726,134217727,1073741820,536870911,2147483646,2147483647,137438953440,8589934591
%N A335956 a(n) = (2^n - 1)*2^valuation(n, 2) for n > 0 and a(0) = 0.
%F A335956 For n > 0, a(n) = A000225(n) * A006519(n). - _Antti Karttunen_, Jul 21 2020
%e A335956 a(4) = (2^4 - 1) * 4 = 15 * 4 = 60.
%e A335956 a(5) = (2^5 - 1) * 1 = 31 * 1 = 31.
%p A335956 a := n -> `if`(n=0, 0, (2^n-1)*2^padic[ordp](n, 2)): seq(a(n), n=0..33);
%t A335956 a[0] := 0; a[n_] := (2^n - 1) 2^IntegerExponent[n, 2]; Array[a, 34, 0]
%o A335956 (PARI) a(n) = if (n, (2^n - 1)*2^valuation(n, 2), 0); \\ _Michel Marcus_, Jul 21 2020
%o A335956 (Python)
%o A335956 def A335956(n): return ((1<<n)-1)*(n&-n) # _Chai Wah Wu_, Mar 17 2023
%Y A335956 Cf. A000225, A006519, A168604.
%K A335956 nonn
%O A335956 0,3
%A A335956 _Peter Luschny_, Jul 21 2020