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!)
A258438 Sum_{i=1..n} Sum_{j=1..n} (i OR j), where OR is the binary logical OR operator. 1

%I #31 Nov 04 2022 07:31:45

%S 0,1,9,24,64,117,189,280,456,657,889,1152,1464,1813,2205,2640,3376,

%T 4161,5001,5896,6864,7893,8989,10152,11448,12817,14265,15792,17416,

%U 19125,20925,22816,25824,28929,32137,35448,38880,42421,46077,49848,53800

%N Sum_{i=1..n} Sum_{j=1..n} (i OR j), where OR is the binary logical OR operator.

%H Giovanni Resta, <a href="/A258438/b258438.txt">Table of n, a(n) for n = 0..10000</a>

%H Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, p. 42.

%F a(2^k) = (3*8^k+5*4^k)/4-2^k. - _Giovanni Resta_, May 30 2015

%F a(2^k-1) = 2^(k-2) * (4 - 7*2^k + 3*4^k). - _Enrique Pérez Herrero_, Jun 10 2015

%F a(n) = n^3 + n^2 - A224924(n). - _Robert Israel_, Jun 11 2015

%p A[0]:= 0:

%p for n from 1 to 100 do

%p A[n]:= A[n-1] + n + 2*add(Bits[Or](i,n),i=1..n-1)

%p od:

%p seq(A[i],i=0..100); # _Robert Israel_, Jun 11 2015

%t a[n_] := Sum[BitOr[i, j], {i, 1, n}, {j, 1, n}]; Table[a[n], {n, 0, 40}]

%o (PARI) a(n) = sum(i=1, n, sum(j=1, n, bitor(i, j))); \\ _Michel Marcus_, May 31 2015

%Y Cf. A224924.

%K nonn,base

%O 0,3

%A _Enrique Pérez Herrero_, May 30 2015

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)