OFFSET
0,3
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..10000
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 42.
FORMULA
a(2^k) = (3*8^k+5*4^k)/4-2^k. - Giovanni Resta, May 30 2015
a(2^k-1) = 2^(k-2) * (4 - 7*2^k + 3*4^k). - Enrique Pérez Herrero, Jun 10 2015
a(n) = n^3 + n^2 - A224924(n). - Robert Israel, Jun 11 2015
MAPLE
A[0]:= 0:
for n from 1 to 100 do
A[n]:= A[n-1] + n + 2*add(Bits[Or](i, n), i=1..n-1)
od:
seq(A[i], i=0..100); # Robert Israel, Jun 11 2015
MATHEMATICA
a[n_] := Sum[BitOr[i, j], {i, 1, n}, {j, 1, n}]; Table[a[n], {n, 0, 40}]
PROG
(PARI) a(n) = sum(i=1, n, sum(j=1, n, bitor(i, j))); \\ Michel Marcus, May 31 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Pérez Herrero, May 30 2015
STATUS
approved