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.

A350093 a(n) = Sum_{k=0..n} n OR k where OR is the bitwise logical OR operator (A003986).

This page as a plain text file.
%I A350093 #13 Jan 31 2024 02:11:09
%S A350093 0,2,7,12,26,34,45,56,100,114,131,148,174,194,217,240,392,418,447,476,
%T A350093 514,546,581,616,684,722,763,804,854,898,945,992,1552,1602,1655,1708,
%U A350093 1770,1826,1885,1944,2036,2098,2163,2228,2302,2370,2441,2512,2712,2786,2863
%N A350093 a(n) = Sum_{k=0..n} n OR k where OR is the bitwise logical OR operator (A003986).
%C A350093 The effect of n OR k is to force a 1-bit at all bit positions where n has a 1-bit, which means n*(n+1) in the sum.  Bits of k where n has a 0-bit are NOT(n) AND k = n CNIMPL k so that a(n) = A350094(n) + n*(n+1).
%H A350093 Winston de Greef, <a href="/A350093/b350093.txt">Table of n, a(n) for n = 0..10000</a>
%F A350093 a(n) = ((3*n+2)*n + A001196(n)) / 4.
%F A350093 a(2*n) = 4*a(n) - n.
%F A350093 a(2*n+1) = 4*a(n) + 2*n + 2.
%F A350093 a(n) = A222423(n) + A224915(n), being OR = AND + XOR.
%o A350093 (PARI) a(n) = (3*(n^2 + fromdigits(binary(n),4)) + 2*n) >> 2;
%Y A350093 Cf. A003986 (bitwise OR), A001196 (bit doubling).
%Y A350093 Row sums of A080098.
%Y A350093 Other sums: A222423 (AND), A224915 (XOR), A265736 (IMPL), A350094 (CNIMPL).
%K A350093 base,easy,nonn
%O A350093 0,2
%A A350093 _Kevin Ryde_, Dec 14 2021