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.

A349932 Product of n and its binary ones' complement.

This page as a plain text file.
%I A349932 #18 Dec 19 2021 04:23:12
%S A349932 0,2,0,12,10,6,0,56,54,50,44,36,26,14,0,240,238,234,228,220,210,198,
%T A349932 184,168,150,130,108,84,58,30,0,992,990,986,980,972,962,950,936,920,
%U A349932 902,882,860,836,810,782,752,720,686,650,612,572,530,486,440,392,342,290
%N A349932 Product of n and its binary ones' complement.
%F A349932 a(n) = n*A035327(n).
%e A349932 For n = 9, a(9) = 0b1001 * 0b0110 = 9 * 6 = 54.
%o A349932 (PARI) a(n) = n*bitneg(n, exponent(n)) \\ _Andrew Howroyd_, Dec 05 2021
%o A349932 (Python)
%o A349932 def a(n): return 0 if n == 0 else n * (n^((1 << n.bit_length()) - 1))
%o A349932 print([a(n) for n in range(1, 58)]) # _Michael S. Branicky_, Dec 05 2021
%Y A349932 Cf. A035327.
%K A349932 nonn,base,easy
%O A349932 1,2
%A A349932 _Judson Neer_, Dec 05 2021